Differences between revisions 18 and 24 (spanning 6 versions)
Revision 18 as of 2024-07-14 09:56:39
Size: 2914
Editor: PieterSmit
Comment:
Revision 24 as of 2024-07-14 10:24:00
Size: 3333
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * [[https://www.youtube.com/watch?v=o8yNNVFzNnM|YouTube]]  * [[https://docs.esp-rs.org/book/|The Rust on ESP Book]]
 * [[https://www.youtube.com/watch?v=o8yNNVFzNnM|YouTube]] => [[https://github.com/flyaruu/rust-on-esp32|GitHub]] => [[https://github.com/esp-rs/esp-idf-template|GitHub template]]
 * Install pre-requisites {{{
sudo apt install pkg-config libssl-dev libudev-dev
#
cargo install cargo-generate &&\
cargo install ldproxy &&\
cargo install espup &&\
cargo install espflash &&\
cargo install cargo-espflash
}}}
Line 8: Line 18:

Rust embedded esp32

  • IDF - Iot Development Framework.
  • The Rust on ESP Book

  • YouTube => GitHub => GitHub template

  • Install pre-requisites

    sudo apt install pkg-config libssl-dev libudev-dev
    #
    cargo install cargo-generate &&\
    cargo install ldproxy &&\
    cargo install espup &&\
    cargo install espflash &&\
    cargo install cargo-espflash
  • Check esp usb/serial connection

    cargo espflash board-info

esp8266

2019 connect old esp8266 Huzzah

  • https://www.adafruit.com/product/2471

  • Connect to usb using FDDI 3.3v cable (White usb plug)
    • Connect to serial /dev/ttyUSB using screen

      sudo screen /dev/ttyUSB0
    • When i click the reset button on esp8266 i get the welcome message

      NodeMCU 0.9.5 build 20150318  powered by Lua 5.1.4
      lua: cannot open init.lua
    • Switch on red led on esp8266 using lua commands

      gpio.mode(3, gpio.OUTPUT)
      gpio.write(3, gpio.LOW)
      #Pause red led on
      gpio.write(3, gpio.HIGH)

Program the HUZZAH ESP8266

For the HUZZAH ESP8266 breakout buttons for GPIO0 and RESET are built in to the board. Hold GPIO0 down, then press and release RESET (while still holding GPIO0), and finally release GPIO0.

$ sudo esptool --port /dev/ttyUSB0 erase_flash

  • Upload firmware

    $ esptool --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 firmware.bin
    ## Press hold left button, then click reset, upload begins.
    esptool.py v2.1
    Connecting........_____....._____....._____....._____....._____....._____.....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Enabling default SPI flash mode...
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Erasing flash...
    Flash params set to 0x0040
    Took 2.55s to erase flash block
    Writing at 0x00015800... (14 %)
    ...
    Wrote 615424 bytes at 0x00000000 in 67.2 seconds (73.2 kbit/s)...
    
    Leaving...
    Hard resetting...

Setup Arduino for esp8266

...

esp8266 (last edited 2024-07-15 08:16:45 by PieterSmit)