Avatar for user144453

user144453

Member since May 2022 • Last active May 2022
  • 2 conversations
  • 3 comments

Most recent activity

  • in ESP8266
    Avatar for user144453

    Hello, I am trying to read ESP-01 (ESP8266) Espruino log with Arduino UNO by serial and not works correctly.

    My Arduino UNO code:

    [#include](http://forum.espruino.com/sea­rch/?q=%23include) <SoftwareSerial.h>
    SoftwareSerial mySerial(0, 1); // RX, TX
     
    void setup() {
      //Init serial ports
      Serial.begin(9600);
      mySerial.begin(115200);
    
      Serial.println("Hello from arduino");
    
      delay(5000);
    }
     
    void loop(){
     String IncomingString = "";
     boolean StringReady = false;
     
     while (mySerial.available()){
       IncomingString = mySerial.readString();
       StringReady =  true;
      }
     
      if (StringReady){
        Serial.println("Received String: " + IncomingString);
      }
    }
    

    Espruino code:

    var wifi = require("Wifi");
    var http = require("http");
    wifi.connect('YYYY', {password:'XXXX'}, function(e) {
      if (e) {
        console.log('error during connect:',e);
        wifi.disconnect();
      } else {
        console.log('connected to wifi');
        wifi.stopAP();
        //wifi.save();
        http.get("https://jsonplaceholder.typico­de.com/posts/1", function(res) {
          res.on('data', function(data) {
            console.log(data);
          });
        });
      }
    });
    

    Actual arduino uno log: Screenshot in attachments

    Excepted log:

    connected to wifi
    {
      "userId": 1,
      "id": 1,
      "title": "sunt aut facere repellat provident occaecati excepturi o
    ptio reprehenderit",
      "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
    }
    
  • in ESP8266
    Avatar for user144453

    Its works! Thanks!

  • in ESP8266
    Avatar for user144453

    Hello, I have the ESP8266 - ESP-01 board with parameters below

    I uploaded the firmware with Arduino UNO connected to the PC. (Link to tutorial)

    Serial port /dev/cu.usbmodem1101
    Connecting....
    Detecting chip type... Unsupported detection protocol, switching and trying again...
    Connecting...
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: a0:20:a6:0c:38:8e
    Uploading stub...
    Running stub...
    Stub running...
    Manufacturer: 5e
    Device: 6014
    Detected flash size: 1MB
    Hard resetting via RTS pin...
    

    Flash command:

    esptool.py --port /dev/cu.usbmodem1101 --baud 115200 write_flash \
      --flash_freq 40m --flash_mode dout --flash_size 1MB \
      0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin \
      0xFC000 esp_init_data_default.bin 0xFE000 blank.bin
    

    And after flash the esp not communicate with web IDE.

Actions