I see. Thank you. So the file has to be located on the board. Too bad, it's hard to debug complicated applications. For now I'll stuff all my code in main.py.OlivierLenoir wrote: ↑Tue Mar 17, 2020 8:46 am
- Create file wifi.py on your computer with the here bellow code
- Connect to your board rshell -p /dev/ttyUSB0
- Use rshell to copy wifi.py on your board cp wifi.py /pyboard/
- From rshell start repl
- You can now import your module from wifi import WIFI
- ...
How to include a module
Re: How to include a module
Re: How to include a module
Even though that works, I'd advice against it. Not just for the sake of doing 'the right thing' but mainly because it'll force you to learn Python and debugging techniques etc. It's lik the difference between trying random things until it works (not much learned), and investigating the problem followed by applying a fix of which you understand why it works.