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.

Wednesday, 26 March 2014

7Seg on Indiegogo

I just saw this fun little project which adds a 7 Segment display to Raspberry Pi. It's currenty seeking funding on idiegogo:
While there are a lot of projects on crowd funding sites which are pretty lazy "we don't have a business plan, so thought we'd ask everyone to send us cash instead", this one looks like a pretty good cause - Tom the designer is an A level student trying to do something pretty cool so deserves support.

He's got a few examples of how to control the thing in Python, but like most Python codes the make the whole thing look pretty complex, when in fact using this is dead simple:

make rst digital output 22
make up digital output 4

make count number

when update
.set rst to on
.wait 5 millisecs
.set rst to off
.repeat count
..wait 5 millisecs
..set up to on
..wait 5 millisecs
..set up to off


It uses two pins 15, and 17 which we've called rst (reset) and up. All we have to do is pulse rst to set the count to zero, and then pulse up to increase the value by one, so we loop count times to set it to the value we want (leaving a little delay just to make sure things have time to happen).

Now we can add it to any program just by saying:

when start
.forever
..set count to pick random 1 to 6
..broadcast update
..wait 1 secs

If you think one of these would be fun to have you can get one for £10 (if you're quick) from http://www.indiegogo.com/projects/7seg-for-raspberry-pi.
More info and pics:http://7seg.co.uk/index.html

Good luck Tom!

No comments:

Post a Comment