Skip to content

Commit

Permalink
fix: properly reserve led strip pins (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen authored Sep 29, 2023
1 parent 6c0623a commit 75ee437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generators/arduino/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Arduino.PinTypes = {
STEPPER: 'STEPPER',
SERIAL: 'SERIAL',
I2C: 'I2C/TWI',
SPI: 'SPI'
SPI: 'SPI',
LEDSTRIP: 'LEDSTRIP',
};
Arduino.ORDER_OVERRIDES = [
// (foo()).bar -> foo().bar
Expand Down
1 change: 1 addition & 0 deletions generators/arduino/leaphy_extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function getCodeGenerators(Arduino) {
var leds = Arduino.valueToCode(this, 'LED_SET_LEDS', Arduino.ORDER_ATOMIC) || '0'
Arduino.definitions_['define_led_lib'] = '#include "ledstrip.h"';
Arduino.definitions_['define_leds_pins'] = 'LEDSTRIP ledstrip(' + pin + ', ' + leds + ');';
Arduino.reservePin(block, pin, Arduino.PinTypes.LEDSTRIP, 'Led Strip');
var code = '';
return code;
};
Expand Down

0 comments on commit 75ee437

Please sign in to comment.