Custom board definition (MYBOARD.py) and pin aliases #6730
Unanswered
espruino-discuss
asked this question in
Porting to new Devices
Replies: 1 comment
-
Posted at 2016-10-11 by @gfwilliams It's a bit of a hack at the moment - LEDs and Buttons are treated differently. The best method is to make your own
Posted at 2016-10-11 by ddm Right! I had not thought of that... :) I have 2 goals (not mutually exclusive):
I guess this solution addresses 1. but would there be a way to address 2. as well ? Posted at 2016-10-12 by @gfwilliams It doesn't burn JS variables either - it's one of the big things about Espruino - that all built-in variables/functions exist without taking up any RAM :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-10-11 by ddm
Assuming that the MCU is already supported by Espruino (STM32, ESP8266, nRF5x etc.), how would one define pin aliases (e.g. ADC=D1) without sacrificing a JS variable (e.g. RAM-constrained board) ?
It does not seem to be sufficient to add
to MYBOARD.py to have
ADC
automatically available as a global variable in JS as an alias to D1Beta Was this translation helpful? Give feedback.
All reactions