All controller functions functional! Now I need some remote projects!

This slideshow requires JavaScript.

So I have gotten to a point at which everything for the controller works. SD card, Xbee, BT serial, Shift LCD, PS2, and NunChuck. Pretty awesome. But if all of that code is enabled at once, I would have less than 1k bytes to write actual code to interface with things. In the code I have debugging via serial, debugging via LCD (for the controllers). I do like having debugging for LCD, but there is a problem: the PS2 library takes up 5k bytes. So when I actually build the controller, I don’t think I’ll include a PS2 connector, at least initially.

Breakdown of Sizes
with SD enabled
Everything Enabled: 29024 Bytes
Only LCD debug: 27252 Bytes
Only NUN LCD debug, PS2 disabled: 22550
Only PS2 LCD debug, NUN disabled: 25900
Only PS2 & Nun, no debug: 24690
Only PS2, no debug: 24484
No ps2 or Nun: 20972
With SD disabled
Nun and PS2 disabled:13488
BT disabled + SD + NUN PS2
Xbee: 11910
Everything Disabled:
11886 bytes

I think the optimal configuration would be to use the Nunchuck with LCD debugging information, with SD, XBEE and BT, coming at a total of 22550 bytes, giving me about 7.5k to write my code for all of my interfaced devices.

This has led me to the idea, that my interfaced devices should be giving the controller, the menus it should show. I’m thinking of an initial packet that is exchanged between the two, which has a good amount of strings, that are then saved into flash on the controller, and once data starts arriving, those ‘labels’ of the data will make the data make sense. Another idea is to use the SD card to carry firmware for remote projects, and remotely flash them using the controller on the go, so I can update code for my cars without having to take my laptop down there.

Well here it is: http://pastebin.com/JudSCJNN

Continue reading

Advertisements

PS2 controller working!

It wasn’t too hard to setup either, I just followed Bill Porter’s guide, as well as this post, which explicitly stated which wires went where.  This seems like it would be a good simple connection to support on a controller, I just need to compare it to the wiimote / nunchuck.  A nunchuck only has 1 joystick and 2 buttons and an accelerometer, whereas this has 2 joysticks and 8 analog buttons with 8 digital (2 in joysticks).  The analog button itself may be a input button, I’m not sure.

My idea with the controller, is since it will be pretty small, I can either clip it to my belt or hang it from my neck, using the controller to control the RC thing, without needing to look at the LCD (I got 5 3.3V 4×20 LCD’s today as well).  With the nunchuck, I could use the accelerometer to adjust trim, whereas I’d use the actual thumbstick for steering.

Yesterday I spent some time to reorganize my desk and now I am much happier with it.  I added a shelf to the side to provide more storage and equipment placement (power supply + oscilloscope ).  I’ll have 1 or 2 laptops there, and a spare monitor to use it if needed.  Synergy will be used so only 1 mouse and keyboard needed for the most part (login seems problematic).  I think it is a good practice to maintain your tools, and a computer desk is a workbench, so if you can improve your work area, it can make you more productive and focused.  At least I think so 😛  Next thing to play with will be the RFM12B modules, or perhaps the 3.3V LCD’s.  Oh and I need to continue working on the VDay card and getting it ready for release 🙂