Sniff is a "Scratch-like" programming language that's designed to help Scratchers move gently from Scratch to more conventional languages. They can start writing programs, without having to learn a new language because Sniff is based on Scratch. They learn a little more about variables, compiling, syntax errors (!), and they can have fun controlling real hardware while they're doing it.

Monday, 4 August 2014

Release 8

This week Sniff is off to the Scratch@MIT conference!!! We'll definitely by posting more about that later in the week, but as a result of this we've pushed up the release of Sniff V8 which is now available for download.

As usual this means support for a whole load of new devices, which we'll blog about over the next few weeks. Most importantly these include:

  • Gamebuino 
  • Punchthough Bean (not quite finished)
  • SIM900 Mobile Phone Shield

The Gamebuino is a really cool Arduino variant (compile with gb-sniff), in the form of a hand-held mini-console. Having fixed hardware, makes it simple to work with, and to prove it there's a really cool demo game in the examples folder: Bounce Out... like breakout with gravity! A full blog entry on this to follow.

Even if you don't have a Gamebuino you still win from this, as it uses the Nokia LCD screen. We already supported this screen, but the prospect of writing an arcade game for the Gamebuino prompted us to upgrade its performance, so now its super fast! The Gamebuino also comes with a really cool sound library, which we've modified and incorporated into Sniff, as an avrSound device. It lets you play 3 (or maybe 4) part harmonies without any hardware, other than a speaker. Again thats an entire tutorial in itself!

The Punchthrough Bean is another Arduino comparable (compile with bean-sniff), but this time it operates via Bluetooth, so you can program it over the air. You'll need to use the bean-loader to upload your hex file. The "bean" device which gives you access to the bean's onboard accelerometer, tricolour led and BLE serial needs more work, but it should get you started. Currently the Serial port only works as an output (SAY works, but ASK doesn't).

However there's also something we've not done for a while: we changed the syntax! Devices were previously identified by their device types, so if you made a dht device it was called dht. That still works, so you can carry on as before, but we've added the option to name devices so you can

make thermometer dht11 device
make display lcd device

This means you can swap out a ds18 for a dht11, or an lcdi2c for a regular lcd just by changing the declaration, rather than the whole code. However we've also taken the opportunity to rename some of the devices. Previously we tried to keep device names "meaningful" so for example the ds1307 device was called clock. Now you can name your own devices we can give the devices more specific names, and then you give them your own friendly names: "make clock ds1307 device". If you want a different kind of clock device (like the nativeClock device), then you can select it for yourself.

Finally we've improved string handling, so that it uses WAY less memory. When we initially implemented it we were just happy it worked, but now we've revisited it to re-use string workspace memory more efficiently (for example the Adventure game uses 1/5th of the memory it did).

Hopefully we've not broken anything - I'd have preferred to do a bit more testing, but we wanted to get all these goodies out to you before we head off to Boston!

Download


No comments:

Post a Comment