I finally got round to cleaning up the 1.6 code I used in the Dome light kit. I fixed a few bugs and tweaked it here and there, so thought it worth uploading the finished code and making it available in a location that the latest could always be found. I am sure it will keep getting tweaks. I included 3 examples;
1. Simple Random logics PSIs and no HPs. Similar to the default code.
2. All the script options in the loop as demo. Similar to the video for 1.4.
3. The last used version of my I2C control to better see how I triggered it to control all the HPs, PSIs and Logics.
I hope it should make it easier to figure out how it works, but I may need to go back and annotate it a little better.
I also collected up all the sketches I have got working so far for the Ard2-P2 controller and droid Arduinos, all libraries used and the XBee files. All the Arduino use I2C in 1 direction to talk from master to end units. There are 6 Arduino in the set-up so far:
1. Pad end. Currently a Nano, but due to become a mini mega. Plus PS2 pad, Screen and Xbee.
2. Droid master end. Currently a mega but will swap to an Uno plus XBee Shield. Connects to Siren 10 and Sabertooth 2x25.
3. MP3 Uno and Sparkfun MP3 shield.
4. 2-3-2 Uno. Connects to actuator pots and relays for 2-3-2 setup.
5. Dome Servo Uno. Connects to the signal lines of 12 servos
6. Teeces Pro Micro. All dome lights.
These are all pretty rough, not much annotation and what is there may be wrong. But it all works, except the 2-3-2 code, that is yet to be tested. But all WIP so may not be how it all works in the final incarnation, but will try and keep all major updates in new files in there from now on. Will also start uploading things like the test sketch i used for the dome sensor. Could be really useful for someone, and easier to follow than hidden in the main file.
All the files are here:
Google Drive Folder
I have only been playing with the Arduino stuff for about 6 months or so, and hadn't coded at all for more than a decade, so this may not be done in the textbook manor, but it all works. :) And so far works well.
The standard LCD arrived, so will have to try and get that up and running soon. Fingers crossed on that one. Also started wiring the feet motors from the legs into the body. Exciting times. Just making a mount plate for the ESC, Master Arduino and the Slip Ring board and he will be almost ready to roll.