That sounds pretty good. Read about boot loaders and programmers.I think its time to step back and start over. I have no idea what im doing with flashing...I need to do some research and start from step one...
Something about this did sound familiar... I only glanced at the previous thread. I've been working with an ESP12F myself for the last year or so now and unfortunately I'm very familiar with the messages.Sorry, this is a continuation of a previous thread and I have no idea why the TS would return it to the UNO. I can no longer follow what is going on, so I guess it's time to call it quits.
I hope you can help.
I don't understand flashing the esp8266 into programming mode. You can only enter programming mode by reset or power on.right now, no. im trying to flash the esp8266 into programming mode. once I get it in programming mode, ill switch back to connecting the Arduino UNO to the esp8266 and upload my code which is suopposed to track the international space station in the serial monitor.
Just confused terminology caused by a confusion about what flash mode is.Something about this did sound familiar... I only glanced at the previous thread. I've been working with an ESP12F myself for the last year or so now and unfortunately I'm very familiar with the messages.
I don't understand flashing the esp8266 into programming mode. You can only enter programming mode by reset or power on.
I'll second thatI think you are very close to making this work, the housekeeping parts are annoying but prerequisite.
Andreas' videos are excellent. Very well organized and presented, plus a Swiss accent.hi h91,
Some bedtime viewing, Andreas is an excellent tutor.
E
https://www.youtube.com/results?search_query=andreas+esp32+flashing
ok so im still not very well versed in the hardware, software, flashing, programming methods and all that...but I did manage to get one single reading of the longitude and lattitude of the ISS in my serial monitor. I figured out an ok way to get the board ready for my code, then I skipped the arduino and just programmed right onto the esp8266.Andreas' videos are excellent. Very well organized and presented, plus a Swiss accent.
Great news! It takes time to get all the details organized. Starting out with this stuff is like drinking for a fire hose. Please don't hesitate to ask more questions, it's great to hear about your success!ok so im still not very well versed in the hardware, software, flashing, programming methods and all that...but I did manage to get one single reading of the longitude and lattitude of the ISS in my serial monitor. I figured out an ok way to get the board ready for my code, then I skipped the arduino and just programmed right onto the esp8266.
not even sure its an accurate reading or if its working but I think its a good first step toward finishing with something where I can get an update/reading once a minute or so, and display the coordinates on a small OLED display.
thanks again!!!
so its able to do one reading, but then it disconnects...thought it would repeat since its under "void loop"Great news! It takes time to get all the details organized. Starting out with this stuff is like drinking for a fire hose. Please don't hesitate to ask more questions, it's great to hear about your success!
#include "USE_ESP8266.h"
#include <TimeLib.h>
char server [] = "api.open-notify.org";
void digitalClockDisplay();
void setup ()
{
Serial.begin(115200);
if (!configureNetwork()) //start the network
{
Serial.println("Failed to configure the network");
while(1)
{
delay(0); //halt; ESP8266 does not like infinity loop without a delay
}
}
int ret = client.connect(server, 80);
if (ret == 1)
{
Serial.println("Connected");
client.println("GET /iss-now.json HTTP/1.0"); //the http request
client.print("Host: "); client.println(server);
client.println("Connection: close");
client.println();
}
else
{
Serial.println("Connection failed, error was: ");
Serial.print(ret, DEC);
while(1)
{
delay(0); //halt; esp8266 does not like infinite loop without a delay
}
}
}
char timestampMarker[] = "\"timestamp\":";
char posMarker[] = "\"iss_position\":";
void loop ()
{
if (client.available())
{
String id = client.readStringUntil('"');
if (id.equals("timestamp")) //start of timestamp
{
if (client.find(':')) //a ":" follows each identifier
{
unsigned long timestamp = client.parseInt();
setTime(timestamp);
digitalClockDisplay();
}
else
{
Serial.println("failed to parse timestamp.");
}
}
if (id.equals("iss_position")) //start of position data
{
if (client.find(':'))
{
while(client.peek () != '}' && client.find('"'))
{
String id = client.readStringUntil ('"');
float val = client.parseFloat ();
client.find ('"');
Serial.print(id + ":"); Serial.println(val, 4);
}
}
else
{
Serial.print("Failed to parse position data.");
}
}
}
if (!client.connected())
{
Serial.println();
Serial.println("disconnecting.");
client.stop();
while(1)
{
delay (0); //halt, esp8266 does not like loop w/o delay
}
}
}
String padDigits(int digit)
{
String str = String("0") + digit; //put a zero in front of digit
return str.substring(str.length() - 2);
}
void digitalClockDisplay ()
{
String datestr = String(year()) + "-" + padDigits(month()) +
"-" + padDigits(day());
String timestr = String(hour()) + ":" + padDigits(minute()) +
":" + padDigits(second());
Serial.println(datestr + " " + timestr);
}
#include <SPI.h>
#include <ESP8266WiFi.h>
const char ssid[] = "Home25";
const char password[] = "6033216098";
WiFiClient client;
bool configureNetwork()
{
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay (1000);
Serial.print("Waiting for connection to "); Serial.println(ssid);
}
return true;
}
yes how do I fix it?Starting at line 76:
C++:if (!client.connected()) { Serial.println(); Serial.println("disconnecting."); client.stop(); while(1) { delay (0); //halt, esp8266 does not like loop w/o delay }
You need to understand the code. Follow the logic. You really can't progress if you don't know what these things you are copying and pasting mean and do.yes how do I fix it?
yeah I know...this code is so cryptic that its hard for me to understand. I thought I could go back and learn it all once its working...I will keep trying!You need to understand the code. Follow the logic. You really can't progress if you don't know what these things you are copying and pasting mean and do.
When does this function get called? Why? What is it doing?
sorry wrong person I meant to respond to Yaakovhi h91,
Is this link helpful.?
E
https://forum.arduino.cc/t/esp-8266-timed-out-waiting-for-packet-header/597634/6
It's really not that hard. You just have to one step at a time. You need to figure out how the program flow works. If I "fix it" for you, you aren't going to be able to fix the next thing. I am happy to answer questions about your attempts to make it work differently, but keep in mind, it's not broken. The code is running as it was written.yeah I know...this code is so cryptic that its hard for me to understand. I thought I could go back and learn it all once its working...I will keep trying!
by Aaron Carman
by Jake Hertz
by Duane Benson
by Duane Benson