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.

Tuesday, 22 April 2014

Release 6

After putting if off for a while in favour of building rc-cars and hot wheels test track, the Sniff Beta 6 release is now available from the Downloads page.

Looking at release notes it doesn't look like there's much there, but Arduino Yun and Leo support is actually pretty huge.  These boards handle USB on the main processor, which means they can pretend to be a mouse or a keyboard (Wii mouse anyone?). Remember to include the usb and usbConsole devices if you want to be able to print stuff out the host computer! The downside to this flexibility is that you have less memory left for your code (as about 6.5K is used up by the USB stuff), and programming is a little more tricky, so stick with the Uno over the Leo unless you need these features.

The Yun however is a different beast - it runs Linux on one processor, and has regular (ish) Arduino piggybacked on. This means you either communicate with it like a Leo, or use the Unix side to access it via the network. The Yun-upload script lets you send a compiled Sniff program to the Yun over the network. 

Your Sniff program can also talk to the Linux processor using the Bridge device. This doesn't yet support the full range of services in the Arduino Bridge library, but allows you to use the bridgeConsole to access text i/o over the network (check the examples and manual for more info - YES there's a manual!!).

Arduino bridge also supports keystore access. This is a great feature of the Yun that's massively under documented in the Arduino world. Using the bridgeKeystore device, you can use the variables bridgeKey, and bridgeValue to put and get values into a dictionary that's held on the Linux side of the Yun. Most crucially you can access this store from elsewhere on the network using http. Just access the URL: arduino.local.//data/get or arduino.local.//data/get/keyname to fetch values, and arduino.local.//data/put/keyName/newValue to change them. For example you could use this to fetch values from a sensor, or send values to a controller, without having to write any significant networking code.

Elsewhere there's also support for i2c lcd displays, and the lpd8008 device is now included. Other new examples include code for PiBot, Pibrella, 7Seg, and the Hot Wheels demo.

No comments:

Post a comment