I'm building Espruino on custom board (based on STM32F4) which have five buttons and I would like to add the definition of the fifth button to binary. I added definitions of buttons to STM32F4DISCOVERY.py file and also I added BTN5 to simpleDevices array in build_platform_config.py but when I flash the board and try to call BTN5 I get Uncaught ReferenceError: "BTN5" is not defined. Do I need to define this button somewhere else or it's not possible to define more buttons or other devices? I found note about this mentioning that I can you LED1-LED8, BTN1-BTN4, etc., but I need one more button for convenience. Thanks for any advice
As far as I remember there are only 4 buttons built-in - but it'd be easy enough to add more.
Just do a text search over all the files for BTN4, and where it says that, copy the relevant lines and rename to BTN5 :)
Heureka, I did not know that it can be somewhere in jspin.c. Thank you very much :)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem