aboutsummaryrefslogtreecommitdiff
path: root/Pd_firmware
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-05-20 16:26:57 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-05-20 16:26:57 +0000
commitd9d68bcebdfa43b58a513fb6cf8b8c91c3fa6e3e (patch)
tree8231736b8251474938d2db443d87db4101e3343f /Pd_firmware
parentd034240b67b12ecd43299eb012c9c55acd3d3150 (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')
-rw-r--r--Pd_firmware/Pd_firmware.pde37
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);
}