4

There is the aJson library that allows you to work with JSON objects in Arduino. However, depending on the complexity of your program, I would just do it manually to save memory. You may be able to just copy the functions you want out of the library. Then check out the WebClient library which has an example for making a POST request at the bottom.


4

It depends on your skills and what you have in your Arduino "box". Let's assume you have an ethernet or WiFi shield. I would go with a PHP script (I'm a PHP dev, but any language will fit) that accepts POST requests sent by the board and store them in a SQLite db. Why SQLite instead of MySQL? Well, it's just a matter of data portability. You copy the ...


2

You are reading the input pin float PPG = analogRead(A7); only in the startup code of your program. Move that into the loop to have it updated before using it.


2

The capacitor in the sample-and-hold circuit in the ADC frontend is tied to ground and it is very leaky. Unless you have a low or medium impedance output connected to it, you will always read the ground value. An antenna is a very high impedance device.


2

Yes. If you're using an Ethernet Shield, you should be able to run a webserver on the Arduino and simple do an HTTP request from your C# webservice to the Arduino. Check this tutorial on how to write a webserver for arduino using the ethernet shield: http://arduino.cc/en/Tutorial/WebServer Doing an HTTP request of any kind from C# should be easy enough ...


2

As far as the Wi-Fi and Uno is concerned, it's not too difficult. You should download its library for Arduino, which is available on Github and then try its example named Wifi Client. In this example, change your SSID and password, and run serial terminal. It will show you that your Arduino is connected to Wi-Fi and it will also display your IP Address. ...


2

Thanks to @Majenko I was able to find the right solution. The resolution is here Essentially, a secure WiFiClient needs to be created and used in the HttpClient constructor Paste the HTTPS URL You are trying to connect to, in a browser window and grab the SHA1 Fingerprint of the certificate Create aninstance of WifiClientSecure Call Connect on ...


2

You are only making an HTTP request to an HTTPS server. It's not going to work. AFAIK there is no direct support for HTTPS in the ESP8266 libraries, but there is support for SSL, and you can then manually create an HTTP request over that - as detailed in the HTTPSRequest.ino example.


2

Found the problem, even though I set azure to accept http requests, it was still redirecting to https which the arduino couldn't handle. I've written a python script to offload the requests to the linux processor, and now it works.


2

You have: server.on("/", handleRoot); server.on("/test.svg", drawGraph); server.on("/",HTTP_POST,response); The first call using handleRoot species no particular method, and in this case it seems any method is acceptable. You later specify server.on("/",HTTP_POST,response); specifically for POST requests. These are ...


1

Try a simpler approach (with some code refactoring) bool TrySend(){ if(client.connect(ServerChar, 25)){ theFile = SD.open("Smtp.txt"); if(theFile){ while(theFile.available()){ client.print(theFile.readStringUntil('\n')); client.print('\n'); } theFile.close(); return true; } } return ...


1

Your problem is here: client.print(" "); //SPACE BEFORE HTTP/1.1 client.print("HTTP/1.1"); client.print("Host: "); client.println(server); client.println("Host: 192.168.0.14");//eg: 192.168.0.222 client.println("Connection: close"); client.println(); That ends up with: ....(your request)... HTTP/1.1Host: 192.168.0.14 Host: 193.168.0.14 Connection: ...


1

On 32 bit systems, uint32_t is usually the same as unsigned int and unsigned long. You should be able to parse the number using strtoul(), which is quite standard and returns an unsigned long.


1

+CREG: 1,"002A","0F48" That's the registration status. "1" is "Registered on your 'home' network", "002A" is your LAC (Location Area Code) and "0F48" is the Cell ID (CI).


1

HTTP/1.1 requires you to provide the host name of the server. And it will keep the connection open for some time unless you explicitly opt out of this. Thus, the equivalent of the basic HTTP/1.0 request in HTTP/1.1 language is POST /the_uri HTTP/1.1 Host: foo.example.com Connection: close


1

With the help of the library developer, I found out that it was a problem on the handshake version. So, I just downgraded my socket.io app from 1.0 to v 0.9.11 and it worked.


1

I would make a small http REST API on your SQL server. The Arduino could use the API to get the data. The API can easily be done in php, ruby or whatever.


1

You can try the AWS IoT Embedded C SDK, that is for more general devices. Other Arduinos requires a crypto library and a device powerful enough, maybe PI, to support the authentication process... At this time they have no crypto library like the YUN SDK, for other Arduinos... Try it...


1

Using byte server[] = {XX, XX, XX, XX}; //IP if (client.connect(server,80)) { instead of if (client.connect("mysite.com.br",80)) { worked


1

The PubNub website has a link to an Arduino library: https://github.com/pubnub/arduino Although it doesn't have specific support for the ESP8266 per se, it does support the Arduino Ethernet Shield, Arduino Wifi Shield and Arduino Wifi101 Shield, so I would imagine it wouldn't be hard to adapt the code. Be aware that for the Arduino Uno, the SRAM will be ...


1

It becomes lots easier if you see the yun as a linux computer with a arduino connected over serial. Then the question becomes: what is the best way to send commands over the internet to a (linux) computer. Answer: there are so many ways because there is no best way. What are the main key drivers: Your linux computer needs to be reachable from the internet. ...


1

Solved! Changed the following lines: client.println("Content-Type: multipart/form-data"); client.print("Content-Length: "); client.println(63); client.println(); client.println("sale[itemId]=123456789012341234&sale[machineId]=123456789012341234\r\n"); client.println();


1

Your form actions are empty: when you'll press the buttons, they will send data to the current URL (something like /sd/project_name/index.html) instead of the /arduino url, which sends data to YunClient. Reading your sketch, I think they are something like /arduino/?A=1, right? A couple of advices: start from the sketch and make sure you can control it ...


1

Check this from Arduino docs. In the "Post method request" code example just define your JSON as plain text like char jsonData[] = "{name: 'yourName', data: 'yourData'}" for example, and then call byte postPage(char* domainBuffer,int thisPort,char* page,char* thisData) function passing "jsonData" variable defined before for "thisData" parameter. It worked ...


Only top voted, non community-wiki answers of a minimum length are eligible