geeksville / TenDollarWebcam

A small example app for ESP32 + Micro-RTSP
MIT License
389 stars 59 forks source link

Error at #include "SSD1306.h" #12

Closed dylancaponi closed 5 years ago

dylancaponi commented 5 years ago

When running pio run -t upload

Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 31 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Micro-RTSP> 0.1.6
|   |-- <WiFi> 1.0
|-- <AutoWifi> 0.1.0 #742dabc
|   |-- <Preferences> 1.0
|   |-- <WiFi> 1.0
|-- <WiFi> 1.0
|-- <WebServer> 1.0
|   |-- <WiFi> 1.0
|   |-- <FS> 1.0
Compiling .pioenvs/m5stack-core-esp32/src/ESP32-devcam.ino.cpp.o
/Users/dc/Repo/TenDollarWebcam/src/ESP32-devcam.ino:36:21: fatal error: SSD1306.h: No such file or directory
dylancaponi commented 5 years ago

Solution was to run: pio lib install 562

Now getting Error: Please specify `upload_port` for environment or use global `--upload-port` option.

To find the port, unplug device. Wait and run: ls -lha /dev/tty* > unplugged.txt

Then plug in device. Wait and run: ls -lha /dev/tty* > plugged.txt

Diff the files to find the port: diff unplugged.txt plugged.txt

Eg: > crw--w---- 1 dc tty 16, 3 Apr 4 01:22 /dev/ttys003

Then run: pio run -t upload --upload-port /dev/ttys003

Which still fails with: Inappropriate ioctl for device

Stack trace:

Configuring upload protocol...
AVAILABLE: esp-prog, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttys004
Uploading .pioenvs/m5stack-core-esp32/firmware.bin
esptool.py v2.6
Serial port /dev/ttys004
Traceback (most recent call last):
Connecting...
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2959, in <module>
_main()
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2952, in _main
main()
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2653, in main
esp.connect(args.before)
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 460, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 418, in _connect_attempt
self._setDTR(False)  # IO0=HIGH
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 384, in _setDTR
self._port.setDTR(state)
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialutil.py", line 599, in setDTR
self.dtr = value
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialutil.py", line 469, in dtr
self._update_dtr_state()
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialposix.py", line 636, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
IOError: [Errno 25] Inappropriate ioctl for device
*** [upload] Error 1