mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Updating to rev. 27 of Firmata.
This commit is contained in:
parent
b6c2ce3585
commit
b16871c2db
@ -196,10 +196,7 @@ void setup()
|
|||||||
pinMode(i, OUTPUT);
|
pinMode(i, OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* I2C data is not reliable at higher baud rates, you'll need to change the
|
Firmata.begin(57600);
|
||||||
baud rate on the host computer as well. To get a firmware running with
|
|
||||||
minimal effort, you can try using the default baud rate (115200) */
|
|
||||||
Firmata.begin(38400);
|
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ void setPinModeCallback(byte pin, int mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(pin > 1) { // ignore RxTx (pins 0 and 1)
|
if(pin > 1) { // ignore RxTx (pins 0 and 1)
|
||||||
reportAnalogCallback(pin - 14, mode == ANALOG ? 1 : 0); // turn on/off reporting
|
if(pin > 13)
|
||||||
|
reportAnalogCallback(pin - 14, mode == ANALOG ? 1 : 0); // turn on/off reporting
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case ANALOG:
|
case ANALOG:
|
||||||
digitalWrite(pin, LOW); // disable internal pull-ups and fall thru to 'case INPUT:'
|
digitalWrite(pin, LOW); // disable internal pull-ups and fall thru to 'case INPUT:'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user