Showing posts with label buttons. Show all posts
Showing posts with label buttons. Show all posts

Friday, October 9, 2015

9th Egham Jam – Show and Tell Competition – Prizes donated by 4tronixs


I think we might be coming to the end of the Prize announcements.
So, last but not least are the Prizes donated by 4tronixs.

Robot lovers Prizes from 4tronixs

These prizes are especially situated to the robots lovers.

Each Prize includes:

The PlayHat includes a 3x3 full colour neopixel LED matrix, 4 big buttons and a buzzer.
Great for programming with the Raspberry Pi. This is just begging out for a game of Simon to be created.

PiRoCon and iBoost64 This board is great. Te PiRoCon  plugs right on top of the Raspberry P and gives you all the additional electronics needs to drive motors.
Motors are fun things. When they start they draw a lot of  power (think of train pulling out of the station. It needs far more power to get going then it does to keep itself moving.  Same thing for motors).  This mean if you want to drive motors you need extra circuitry to do it safely without damaging your Raspberry Pi.  The PiRoCon is one of the best solutions for this for the Raspberry Pi.

In addition to motors drawing a lot of power when they start and stop they can also affect the voltage and current of electronics drawing from the same power supply.  This can cause difficulties in getting good readings or accurate control.  This is where the iBoost64 comes in.  It cleans up the signals and makes them good without affecting the rest of the circuit.  Ideal for robots where there can be a lot of stopping and starting of motors as well as reading of external sensors for line following or object avoidance.

With the combination of the PiRoCon and iBoost64 you have the electronics to get that robot built.
If working in Scratch the current ScratchGPIO library from Simon Walters supports the PiRoCon.

If you have robots you will need power.  The final 2 boards are a 1 way and 4 way charger board for Li-Po batteries.  These are great batteries for robotic as they store lots of energy and give out a consistent voltage.  Cheap batteries have a power curve that means they very quickly drop from the maximum voltage which can cause lots of problems with motors.  Li-Po batteries are the ones used in high quality remote control cars.
Unfortunately you can't just plug a Li-Po battery into your normal battery charger due to the way they work so custom chargers are usually provided or need to be purchased with the battery.  These great little boards mean you can use a standard 5V microUSB power supply to charge the batteries.  This is the same type of power supply used for the Raspberry Pi, meaning if you are building a Raspberry Pi based robot you will already have the correct power supply.
There are 2 different boards included.  A 1 way, so it can charge 1 battery and a 4 way which can change 4 batteries at the same time.  Giving you more than enough power for your laser guided, GPS tracking, missile shooting, web cam streaming, grabber, digger, flame thrower robot. Or maybe just a line following robot.

From the picture you can see they also provided some pens.

Thank you 4tronixs for the prizes.







Wednesday, February 4, 2015

Robot Club - fourth session completed


Link to Preparing post details in the parts in the kits.: http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html

Link to First session; http://winkleink.blogspot.co.uk/2015/01/robot-club-first-session-completed.html

Note; I did not post for the second session. There is a short summary in the Third Session post.
Link to Third session: http://winkleink.blogspot.co.uk/2015/01/robot-club-third-session-completed.html

This week we nearly had a full house.
Only 1 child missing due to illness.

The 4 who attended the previous week remember a lot of their work and code so were getting stuck into getting their robots to go around a corner.

I had a bit more fun getting drivers on enough school PCs to permit the Arduino Nano to be seen. It needs custom USB/Serial drivers that are not included by default.

The teacher who is ICT coordinator came in to see the session in full swing with robots spinning, or moving along the floor. With coding going on and due to plus and minus lines on the batteries being shorted a nice little display of black smoke and the lovely smell of burnt plastic.
No real harm done just a jumper wires plastic sleeving was melted.
I congratulated the child on making smoke as it's something we all do when we work with electronics.  They were kind of shocked.
It was great that the teacher had the same attitude so no harm done and no concern about burning down the school.
I tested their robot kit and Arduino. Nothing damaged, amazingly so did a little bit of rewiring and handed them back their robot to get working on again.

On of the kids who was in the previous session had a problem where their robot was pulling to the left.  These are small cheap kits so the motors aren't tuned and the wheels are small and have grip meaning they catch on the carpet.  Meaning they cannot reliably go straight.
We tried to fix it by turning the wheels in or our to change the resistance but no go so introduced that child to analogWrite.
A value of 235 seemed to make it all work perfectly. They had a nice straight running robot.

Once again the kids were not that eager to leave as they were perfecting their code and making it better.

At the end one of the girls who was being collected wanted to show her mother what she had done so she gave a great demonstration of her robot.  Holding down reset to stop it moving.
Set it up and let it go. She then explained the code she had made as well as giving details on some of the other parts we will be using.

Next week we will be using an input device. A small line following sensor. I will mark the edge of the room area with white paper providing a contrast with the blue flooring. The idea will be to detect the paper and make the robot turn.
This will be the first time the kids do inputs and will also require the introduction of the 'if' statement.

Looking forward to another productive session next Monday.

Sunday, February 17, 2013

Quiz Master Raspberry Pi version now working


I copied the Windows code on to my Raspberry Pi last night and it worked perfecty if run from IDLE. But, if I ran it from either a terminal window or double clicked on the icon it failed.

There were 2 problems.

First was that IDLE on Windows put a ^M at the end of every line so the shebang statement on the first line was failing.
To fix this I copied it all into vi and saved it out. This stripped put all the ^M things.  I must admit I didn't expect this from IDLE.
Then after some more searching  and trial and error I eventually figured out that the directory for the program is not set to where the program is run from so when I try to open the players.txt file it fails and dumps me out.

Using os.getcwd() I can find out which folder the program was run from and set it to the path for players.txt and the sound files.

I revised the code and attached a new pack to the forum that now works on the Raspberry Pi.

Make sure to chmod +the .py to make it executable.

Friday, February 15, 2013

Quiz Master Lockout follow up

27-DEC-2019 Updated to change link to code from Dropbox to Git Hub. 


Following yesterdays post about the Quiz Master code I have been doing a bit of tweaking and enhancing. GitHub link to ZIP file

Enhancements in this version.
1. Number of players, their names and sound played when they press their button is taken from a text file (example included)
2. Quiz master can go into lockout mode at any time by pressing return. An X appears top right to show in lockout mode
3. Text at the top of the screen is now taken from the text file - so it can be personalised
4. Now runs full screen ( ran in a window to take the screen shot below)



screen shot


This version is reading keyboard presses. You can buy a USB keyboard on ebay for about £5 and with the aid of some buttons and soldering you can attach the buttons to the keys as defined in your file. Still leaving you with the full keyboard. As mentioned before I see this as the easier option than looking to use GPIO inputs when run from a Raspberry Pi.
These buttons from ebay look perfect.

So, for about £40 (+ cost of connecting wires and housing) you would have a quiz master set up.


NOTE: I would never describe myself as a Python programmer. The code is done in the true hacker sense in that I figured it out as I went along. It all works with the testing I have done but be aware your mileage may be different.