Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Michael Miller
@Makuna
BUT, the issue is to allow other things to continue to work while you wait. See ticker above, I also created an Arduino one some time ago (before esp8266) Github/Makuna/Task to wrap up the concept.
While using Delay() is a nice teaching concept, it is a poor design to use for anything other than examples.
Thomas Cooper
@thomascoope
Excuse my lack of experience but I appear to be fundamentally missing something ... I have an adafruit feather 8266 which I want to transmit REST API posts from - to my already functioning API (via HTTPS).
With reference to this video:
*with the http client library attached to my sketch, am I then using the standard arduino httpClient commands, or some specific to the ESP8266.
Furthermore, is there a reference documeny explaining what can & cannot be done with the Httpcl command?
ient
(excuse autocorrect) *httpClient
enriquecml
@enriquecml
@thehellmaker for test you can search unit test for c++ language
for example cppunit
gtest,CMOCKA for embedded system
Dmitry Munda
@dimkin-eu
Hi!
not so related question, but - if you need to store arduino project in github, how do you deal with sensitive data, like request URLs/wifi passes etc ?
Thomas Cooper
@thomascoope
@dimkin-eu private repo?
Myles Eftos
@madpilot
@dimkin-eu include file that is gitignored.
And them make a note in the repo, and include a sample configuration file
Dmitry Munda
@dimkin-eu
Public repo
Is there possibility to include
Parameters from file?
But how to compile project with right config if there will be sample config? I.e. how to deal with 2 configs then :smile:
Aaron N.
@porkyneal
When you commit the config file do it first with a set of samples.
Then add the file to gitignore
thus it will never be overwritten with your real config file
That way it can keep the same name as the real config file, but just be full of sample data when in the repository
Dmitry Munda
@dimkin-eu
cool, thanx. but then real config will be kept only on original computer . and in case of kaboom will be lost ? :)
Clemens Kirchgatterer
@everslick
@dimkin-eu what's the deal? you just have to get the default config and enter your wifi password and SSID, and you are rolling again.
Dmitry Munda
@dimkin-eu
:+1:
rodrigocirilo
@rodrigocirilo
Please, somebody help me.
I have a client wifi application running in my ESP, I need to know how to save in the eeprom (esp virtual) the IP address of the ex server (192.168.1.200) and also save the SSID and password of the wifi network.
Because through a C # application via tcpip, I will send new values of IP, SSID and password to the ESP save and reboot, picking up the new values.
Tejas H
@CodingCreate101
There are functions built for it
They are there in the example code. Go through them.
rodrigocirilo
@rodrigocirilo
I got the code to save this in the virtual eeprom, but I do not know how to post here
rodrigocirilo
@rodrigocirilo
How to change the IPAddress of the server during program execution, since the IPAddress stays before void setup () and it seems that it does not update the value while the code is running
rodrigocirilo
@rodrigocirilo
this line ( byte server[] = { 64, 233, 187, 99 }; // Google )does not work inside void setup()
Dmitry Munda
@dimkin-eu
wrap text inside ```
if (client.connect(server, 80)) {
Serial.println("connected");
client.println("GET /search?q=arduino HTTP/1.0");
client.println();
} else {
otherwise its unreadable
rodrigocirilo
@rodrigocirilo
Sorry.
 #include <Ethernet.h>
#include <SPI.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte server[] = { 64, 233, 187, 99 }; // Google

EthernetClient client;

void setup()
{
  Ethernet.begin(mac, ip);
  Serial.begin(9600);

  delay(1000);

  Serial.println("connecting...");

  if (client.connect(server, 80)) {
    Serial.println("connected");
    client.println("GET /search?q=arduino HTTP/1.0");
    client.println();
  } else {
    Serial.println("connection failed");
  }
}

void loop()
{
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    for(;;)
      ;
  }
}
Sorry, it does not work.
Dmitry Munda
@dimkin-eu
Screen Shot 2017-08-17 at 20.47.19.png
rodrigocirilo
@rodrigocirilo
@dimkin-eu I got
@dimkin-eu Can you help me?
this line does not work inside void setup() just before
byte server[] = { 64, 233, 187, 99 }; // Google
I need to change the IP during the program running
But when I give a new IP value to the server it does not load the new IP value
Dmitry Munda
@dimkin-eu

just replace

if (client.connect(server, 80)) {

with

if (client.connect({ 64, 233, 187, 99 }, 80)) {

or wharever you need
but thise code sux

rodrigocirilo
@rodrigocirilo
@dimkin-eu But it has to be a variable, since I need to change without compilation, but during the execution of the program, I will receive a new IP via tcp from a C #application
Dmitry Munda
@dimkin-eu
just pass result to server variable
Deveyes
@deveyes_twitter
Hi all, has anyonne encountered an issue where Chrome on Android fails to finish loading a webpage served by the ESP8266WebServer? For me loading the pages works from a pc with the usual browsers, from iOS Safari, a MAC as well, but when accessing the exact same webpage from any browser in Android, Chrome gets stuck.
I tried connecting the phone to a pc via usb to do remote debugging from the pc Chrom. The timing diagramnsays that the request is not finished. I added a windows.onload callback to the served webpage, and it never fires, so it agrees: it's as if the android chrome is waiting to receive a final byte or something, and it never arrives.
rodrigocirilo
@rodrigocirilo
@dimkin-eu Could you please give me an example?
rodrigocirilo
@rodrigocirilo

If I declare the variable before the void is set up so:

byte server[] = {};

And void setup gives a value to it, it continues with empty value
So below is how do I give value to the variable

byte server[] = {192, 168, 1, 200};