Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts
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, April 6, 2014
HC-06 Bluetooth Slave Only
I bought a Bluetooth adaptor from eBay a while back and configured it allow me to login to the Raspberry Pi over Bluetooth.
As part of this I changed some of the settings on the adaptor and like a proper hacker didn't write down the changes anywhere and then lost my code when the Raspberry Pi SD got corrupted and I installed Lubuntu on my netbook (was XP).
After doing a lot of searching online I found details for the HC-05 and how to reset it by setting the Key pin HIGH and putting it into command mode.
After about 5 hours of messing with the adaptor and even noting the Key breadboard pin wasn't connect to the Key pin on the board, so shorted the pads on the back of the board. Then desoldered again
Nothing worked.
Then checked if what I really had was a HC-06. The Slave only version of the HC-05 board and guess what it is an HC-06 board and so the Key HIGH method doesn't work.
But from reading the following Google DOC (https://docs.google.com/document/d/1GPVqL9jlnIKFUL0lRGdRNrYFvxKRR-yjNSRYhlr1j84/edit) discovered you can reset the HC-06 by setting PIN 11 to LOW on the module.
I did this, cycled the power and now I could connect at 9600. All good.
I downloaded the Sketch from here: http://www.plastibots.com/index.php/2013/12/31/hc-06-bluetooth-module-getting-this-sucker-into-at-command-mode/
As part of this I changed some of the settings on the adaptor and like a proper hacker didn't write down the changes anywhere and then lost my code when the Raspberry Pi SD got corrupted and I installed Lubuntu on my netbook (was XP).
After doing a lot of searching online I found details for the HC-05 and how to reset it by setting the Key pin HIGH and putting it into command mode.
After about 5 hours of messing with the adaptor and even noting the Key breadboard pin wasn't connect to the Key pin on the board, so shorted the pads on the back of the board. Then desoldered again
Nothing worked.
Then checked if what I really had was a HC-06. The Slave only version of the HC-05 board and guess what it is an HC-06 board and so the Key HIGH method doesn't work.
![]() |
| Note the little transistor near the header Haven't seen this on any of the HC-05 modules Also, on the back of the board there are 2 sets of pads not populated. |
But from reading the following Google DOC (https://docs.google.com/document/d/1GPVqL9jlnIKFUL0lRGdRNrYFvxKRR-yjNSRYhlr1j84/edit) discovered you can reset the HC-06 by setting PIN 11 to LOW on the module.
I did this, cycled the power and now I could connect at 9600. All good.
I downloaded the Sketch from here: http://www.plastibots.com/index.php/2013/12/31/hc-06-bluetooth-module-getting-this-sucker-into-at-command-mode/
And it worked.
So, no Master mode (cannot initiate pairing) but it's now working so I can have some proper fun with it.
Subscribe to:
Posts (Atom)
