For reasons that I no longer recall, I didn't use the shiftout/spiout commands that look to be available for the Picaxe 18M2 - instead I used the manual bit-bang methods introduced in the Picaxe Manual Part 2. The MCP42010 has dual potentiometers - one can be used for each of the two stereo channels. The 10-kΩ potentiometer that is usually suggested for volume control with the 386 was replaced by a digital potentiometer - the MCP42010 256 Step SPI 10kOhm Digital Potentiometer IC. Mims would do, but I decided to go with simple LM386 audio amplifier circuits - one each for left and right. I though back over the many great educators from my youth and asked myself: "Self, what would Forrest Mims III recommend?". I promptly smoked a couple of PGA2311 Stereo Volume Control chips using my ancient dual-voltage supply and decided to re-think my design. This would give me a little experience bit-banging data to a 3-wire serial device. I decided to make a stereo volume controller. (I didn't even know the nunchuck HAD two buttons.) But now that I had an input device, what to control? With the all-knowing internet as my guide, communication between the wiichuck and Picaxe was readily established and suddenly a 2-axis joystick, a 3-axis accelerometer and two buttons were at my disposal. I ordered a wiichuck adapter and some 3.3V regulators then borrowed one of the wiichucks from the gameroom (it's not needed to watch Netflix anyway). I wanted to learn more about some communication protocols and decided that interfacing a Wii nunchuck ("wiichuck") to a Picaxe would be an easy way to try out the I2C commands. If you want to skip to the good (or at least better) stuff, watch the second video. But either I document this project here or on my turf & soil blog. Nunchuck_stereo_control_joystick_w_freq_gen_0.bas (14044Bytes)
0 Comments
Leave a Reply. |