Go to advanced search

by timrowledge
Wed Jun 19, 2019 7:35 pm
Forum: Beginners
Topic: Power on / shutdown RPI time or network
Replies: 7
Views: 205

Re: Power on / shutdown RPI time or network

There are HATs and other units that can shut a Pi down and remove power, and start it up again when a button is pressed. But I don't know of any that include a timer option. At least a couple have RTCs and micro controllers on board. The piups hat appears to be one example. SparkFun etc carry them.
by timrowledge
Wed Jun 19, 2019 7:21 pm
Forum: General discussion
Topic: How can I connect a lot of Gear flow sensor sensors to RPI?
Replies: 2
Views: 98

Re: How can I connect a lot of Gear flow sensor sensors to RPI?

Take a look at using an ESP8266 per keg, each connected to one sensor. ESPs are really cheap ($5) and are essentially very fast Arduino’s with built-in WiFi. The advantages here are that the Arduino approach handles the real-time interrupt stuff well and the WiFi means easy use of MQTT to send your ...
by timrowledge
Mon Jun 17, 2019 4:13 pm
Forum: General discussion
Topic: Generate multiple PWM signals
Replies: 5
Views: 187

Re: Generate multiple PWM signals

Consider a pwm HAT - SparkFun and AdaFruit both do good pca9685 units. Drive via i2c commands from joan’s Piggpio or even my own daemon.
by timrowledge
Sun Jun 16, 2019 8:04 pm
Forum: Scratch
Topic: Scratch 1.4 audio lock-up after raspbian update && upgrade
Replies: 2
Views: 331

Re: Scratch 1.4 audio lock-up after raspbian update && upgrade

I've racked my brain trying to work out what might be happening here but had no success. The fact that reinstalling 'fixes' it adds confusion. NuScratch does absolutely nothing strange with sounds; it uses ALSA for sound output through the normal device criving api for unix. ALSA does have a bit of ...
by timrowledge
Sat Jun 15, 2019 4:21 pm
Forum: Off topic discussion
Topic: Motors required for rc car
Replies: 2
Views: 485

Re: Motors required for rc car

Go to rcgroups.com and look down the list of forums for the car stuff (lots of plane and boat fun as well). You’ll find people doing pretty much anything you can imagine.
by timrowledge
Thu Jun 06, 2019 6:19 pm
Forum: General programming discussion
Topic: I wants LOLcodes!
Replies: 38
Views: 931

Re: I wants LOLcodes!

I’d say it is a pretty good mickey-take of the strained syntax that so many people consider ‘normal’ for programming.
by timrowledge
Tue Jun 04, 2019 7:59 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

Evidently we were talking at cross purposes for a long time as I struggled to get a result out of Smalltalk. Evidently. It happens. It's whart we invented words for though, right? I just wanted to do a simple thing. Run a program that took a single integer parameter in and put a single integer resu...
by timrowledge
Tue Jun 04, 2019 5:54 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

There's a place for "no talking" libraries. But I also believe there's a place for "scream your head off and bounce from the walls" libraries if that is what people want and it helps them advance. Exactly. There's plenty of grump old gits like me & Heater; kids and other less jaundiced folk have a ...
by timrowledge
Tue Jun 04, 2019 5:52 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

timrowledge, Wait, hang on - how does using any sort of approximation via a floating point number produce a correct answer to an integer problem? Surely that can't be right? Magic isn't it! Damn right. I'm not a Numerics guy by any stretch but that really make my head spin. I'll see what my mathema...
by timrowledge
Tue Jun 04, 2019 12:58 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

It takes 32 seconds in Squeak Smalltalk on my old PC. Over five hours in GNU Smalltalk! As we've mentioned, the latest version (which you can get simply by updating from within the system you already have) is a bit faster and actually does the calculation in 6.6 secs (not 11) on my Pi3 or 0.9s on m...
by timrowledge
Tue Jun 04, 2019 12:41 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

timrowledge, Javascript was created by Brendan Eich. He wanted to make Self for the browser but Netscape insisted he make it look more like Java. That is why JS has all those Scheme like features: first class functions, closures, etc. And let's remember that Self came out of the Smalltalk community...
by timrowledge
Tue Jun 04, 2019 12:38 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

danjperron wrote:
Mon Jun 03, 2019 8:21 pm
Wait, hang on - how does using any sort of approximation via a floating point number produce a correct answer to an integer problem? Surely that can't be right?
by timrowledge
Tue Jun 04, 2019 12:27 am
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

OK, yes I hear the reverb for the file sounds, but it all sounds pretty ok to me other than that. The last two are clear indications that the 'timidity' midi stuff isn't installed; if it were they'd actually be the standard numbered MIDI noises nad changing the drum or instrument would be very heara...
by timrowledge
Mon Jun 03, 2019 8:55 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

danjperron wrote:
Mon Jun 03, 2019 8:21 pm
I will check how long it takes the pi to calculate fibo(4784969). Hum a week, a month?
Evidently you hadn’t noticed that people have been posting the answer(s) o that question for a while now. As an example, it takes around 11secs in Smalltalk. A bit less than a month 😁
by timrowledge
Mon Jun 03, 2019 5:18 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

Given the expertise in technology at MIT, one can't help but wonder whether the requirement to store high scores in the cloud was by design and the need to earn a Scratcher badge before doing so intentional. Luckily, the default Scratch on the Raspberry Pi, called nuScratch, is an update to the ori...
by timrowledge
Mon Jun 03, 2019 4:56 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

Smalltalk is relatively slow at accessing arrays because every access is bounds-checked. This makes some of the favoured trivial benchmarks seem very slow - but it does mean we suffer rather fewer issues with junk getting poked into memory in places where it isn't good. Which is more important? Dep...
by timrowledge
Mon Jun 03, 2019 12:05 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

Then you have a language using a fundamental design that makes it no so good for this particular problem. If this kind of problem is important, you'd need to change something deep in your system. If it isn't, don't worry, accept that decisions have consequences and move on to enjoy whatever benefits...
by timrowledge
Sun Jun 02, 2019 11:59 pm
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

I simply can't hear any problems with sounds on any of my Pi's. I don't know what to suggest next.Maybe record the sounds on your phone and post the sound file (you'd have to at least zip it to be able to upload it here) somewher. Maybe if I hear it I will recognise some symptom?
by timrowledge
Sat Jun 01, 2019 5:58 pm
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

I've been trying out some sounds on one of my Pis to see if I can replicate your problem; and the answer is no, I can't. Even with reverb on, the only sound that is really noticeably affected is the cat meow. Pretty much any other noise is ok. Turning reverb off makes little difference except to the...
by timrowledge
Sat Jun 01, 2019 5:43 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

Although turning an LED on and off can be motivation for learning how to code, it doesn't take strong powers of observation for a child to notice it is impossible to create anything resembling even the simplest commercially-produced video game using Scratch. Whilst one can only agree that Scratch i...
by timrowledge
Thu May 30, 2019 5:39 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 592
Views: 17483

Re: A Final Fibonacci Challenge

I certainly learned some interesting things from fiddling with The Fibonacci Challenge (™) for Smalltalk on my Pi. The obvious new thing was that whole field of amazing number handling algorithms I'd never had reason to look at before. I just love the thought processes behind the "oh, let's stick th...
by timrowledge
Thu May 30, 2019 4:53 pm
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

Sorry for the delayed reply - well, that's annoying. I hoped the issue would be nice and simple to fix :-) Please tell us about exactly which sonds you are having problems with and exactly how you are listening to them. Via hdmi to speakers on a monitor? Headphones plugged into the lineout jack? Sou...
by timrowledge
Thu May 23, 2019 10:00 pm
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

Try using

Code: Select all

sudo cp {theimage} /usr/share/scratch
- that should get around the permissions issue.
by timrowledge
Mon May 20, 2019 11:12 pm
Forum: Scratch
Topic: Scratch 1.4 sound problem.
Replies: 16
Views: 3149

Re: Scratch 1.4 sound problem.

Here's an experimental new version for you to try out; unzip it and move it to /usr/share/scratch. http://www.rowledge.org/tim/squeak/files/NuScratch20190520.image.zip The /usr/bin/scratch shell script (which handles the menu item for Scratch on the desktop) should pick it up as the newest image fil...
by timrowledge
Mon May 06, 2019 9:24 pm
Forum: General discussion
Topic: i'm using adafruit 16 channel pwm driver
Replies: 2
Views: 187

Re: i'm using adafruit 16 channel pwm driver

You may find the daemon I wrote for this useful - see
https://github.com/timrowledge/pca9685servodaemon

Go to advanced search