Tips for ESP8266 Microcontroller
Some general tips to make your life easier:
Mpfshell may be easier than using webrepl for uploading files. See the next section for more info.
Any Python saved as "main.py" on your board will automatically run when the board boots up. When developing, I recommend saving your files as something else, e.g. "foobar.py", and then running it manually in REPL:
import foobar. This way, your "main.py" file won't prevent you from connecting to your board.
Use Ctrl+C or Cmd+C to break out of infinite loops and to stop the current process.
lito view what's in the chip's file system.
rmto remove files.
putto upload files to the chip (relative from the directory you ran
getto download files from the chip.
replto enter into Python REPL mode.
The microcontroller only has one analog pin.
If you want to work around this, you can use two digital output pins in place of the 3V pin to control which analog sensor gets powered at a time. Be careful not to short the circuit though, use a diode to isolate each analog sensor circuit from each other.
A more detailed tutorial can be found here.
The esptool we used has a Github with a troubleshooting section here.
There's also a forum for MicroPython, which may have some useful information.
As always, you can ask us for help on Piazza!