I have recently picked up an analog breadboard cable for the TI CBL 2 / Vernier LabPro to complement my digital breadboard cable, and I've been toying around with various circuits I could use them with. I'm new to working with the digital port, so it'll be a while before any neat miniprojects use it. So far, I have managed to control an RGB LED using the digital output buffer to produce a predefined sequence of colors, linked below.
Code:
I also have used the orientation of a 3-axis accelerometer to control the color, in addition to the state of an infrared LED. I have ported that project from TI-83 series BASIC to Python, using pySerial to interface with the LabPro's serial port.
More and better miniprojects are coming soon, and I'll take any reasonable requests.
Code:
:Send({0} //Reset the interface
:Send({102,-2} //Turn interface power on continuously
:Send({1,31,4,4,2,12,9} //Load 4 binary nibbles 0100 0010 1100 1001 to the digital output buffer, the bits corresponding to infrared, red, green, and blue resp.
:Send({3,.25,12000,0,0,0,0,0,0} //Send the contents of the digital output buffer to the digital port, at 4 nibble/sec
:startTmr→X
:Repeat getKey or 10<checkTmr(X //Run for 10 seconds or until keypress
:End
:Send({6,0} //Stop sending data
:Send({102,0} //Re-enable powersave mode (cancels {102,-2})
:Send({2001,0} //Clear all bits on the digital port
I also have used the orientation of a 3-axis accelerometer to control the color, in addition to the state of an infrared LED. I have ported that project from TI-83 series BASIC to Python, using pySerial to interface with the LabPro's serial port.
More and better miniprojects are coming soon, and I'll take any reasonable requests.