diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-05-20 16:26:57 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-05-20 16:26:57 +0000 |
commit | d9d68bcebdfa43b58a513fb6cf8b8c91c3fa6e3e (patch) | |
tree | 8231736b8251474938d2db443d87db4101e3343f /Pd_firmware/Pd_firmware.pde | |
parent | d034240b67b12ecd43299eb012c9c55acd3d3150 (diff) |
looks like analog input is working fine, next, the digital inputs need to be tested.
svn path=/trunk/externals/hardware/arduino/; revision=5096
Diffstat (limited to 'Pd_firmware/Pd_firmware.pde')
-rw-r--r-- | Pd_firmware/Pd_firmware.pde | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/Pd_firmware/Pd_firmware.pde b/Pd_firmware/Pd_firmware.pde index 6265f26..ba93885 100644 --- a/Pd_firmware/Pd_firmware.pde +++ b/Pd_firmware/Pd_firmware.pde @@ -251,35 +251,26 @@ void setup() { // -------------------------------------------------------------------------
void loop() {
- // read all digital pins
- //transmitDigitalInput(0);
- //transmitDigitalInput(7);
/*
* get analog in
*/
- /*
- for(analogPin=0; analogPin<5; ++analogPin)
- {
- analogData = analogRead(analogPin);
- // these two bytes get converted back into the whole number in Pd
- printByte(analogData >> 7); // bitshift the big stuff into the output byte
- printByte(analogData % 128); // mod by 32 for the small byte
- }
- */
- // ++analogPin;
- // if (analogPin > 5) analogPin = 0;
- /* end with the cycle marker */
- // bitshift the big stuff into the output byte
- printByte(digitalPinStatus >> 7);
- // clear the 8th bit before truncating to a byte for small data byte
- printByte(digitalPinStatus % 128);
+ for(analogPin=0; analogPin<6; ++analogPin)
+ {
+ analogData = analogRead(analogPin);
+ // these two bytes get converted back into the whole number in Pd
+ printByte(analogData >> 7); // bitshift the big stuff into the output byte
+ printByte(analogData % 128); // mod by 32 for the small byte
+ }
- printByte(pwmStatus >> 7);
- printByte(pwmStatus % 128);
+ // read all digital pins
+ transmitDigitalInput(0);
+ transmitDigitalInput(7);
checkForInput();
+ /* end with the cycle marker */
printByte(255);
- setPinMode(13,OUTPUT);
- digitalWrite(13,HIGH);
+
+ // setPinMode(13,OUTPUT);
+ // digitalWrite(13,HIGH);
}
|