Arduino Nunchuck project

nunchuck Sketch_bbI have cobbled together a couple of circuits to combine output to an OLED with input from a Nunchuck, through a WiiChuck adapter.  I have avoided using the analogue pin (by plugging the adapter directly into the arduino, over analogue pins 2-5) and instead used the 3.3v output because apparently the Wii Nunchuck should be powered by 3.3v and not 5v.  I have attached a diagram, but for clarity, there is the wiring explained here too: Continue reading

Processing multiple strings in an array

This post concentrates on filtering values from a one-dimensional array.

There are a lot of really useful functions in PHP, and it’s almost impossible to remember them all.  Array functions are no exception, and as with PHP functions generally the little inconsistencies are just waiting there to catch you out.

Anyway, I just wanted to mention the difference between array_walk and array_map, and why array_map is particularly useful.

Continue reading