Roger in MATLAB Answers
上次活动时间: 2023-10-18

there is a lot of information which dances around the answer to the above. Does ThingSpeak support the R4 or not?
GARAM LEE in MATLAB Answers
上次活动时间: 2022-11-10

Good afternoon. I want to send mpu6050 data to thingspeak every second. However, data is only sent once now. How can I keep sending data? (When I searched for it, there is a saying that the data transfer limit of thingspeak is 15 seconds, so is it possible to transfer data one by one in up to 15 seconds?) And currently, the board and laptop are connected by a usb cable for uploading the code, so can I still send data even if I remove the usb cable and connect the external battery after uploading? Hardware : mkr1000, mpu6050 #include <SPI.h> #include <WiFi101.h> #include <Wire.h> #include <I2Cdev.h> #include <WiFiClient.h> #include "MPU6050.h" #include "ThingSpeak.h" // always include thingspeak header file after other header files and custom macros char ssid[] = "abc-2.4G"; // your network SSID (name) char pass[] = "abcdefgh"; // your network password // Initialize the Wifi client library WiFiClient client; unsigned long myChannelNumber = num; const char * myWriteAPIKey = "key tiped"; MPU6050 accel1; int16_t ax1, ay1, az1; int16_t gx1, gy1, gz1; unsigned long lastTime = 0; unsigned long timerDelay = 1000; // sending every second void setup() { Serial.begin(115200); // Initialize serial Wire.begin ( ); accel1.initialize(); delay(10); WiFi.begin(ssid, pass); // Connect to WPA/WPA2 network. ThingSpeak.begin(client); // Initialize ThingSpeak } void loop() { if (millis() - lastTime >= timerDelay) { accel1.getMotion6(&ax1, &ay1, &az1, &gx1, &gy1, &gz1); //acceleration full-scale range between +-2 g (16,384LSB/g) float accX = ((float)ax1) / 16384.0; float accY = ((float)ay1) / 16384.0; float accZ = ((float)az1) / 16384.0; // set the fields with the values ThingSpeak.setField(1, accX); ThingSpeak.setField(2, accY); ThingSpeak.setField(3, accZ); ThingSpeak.setField(4, gx1); ThingSpeak.setField(5, gy1); ThingSpeak.setField(6, gz1); ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); } lastTime = millis(); // Update the last update time }
Adeola in MATLAB Answers
上次活动时间: 2022-5-4

Can I send data to ThingSpeak without WiFi? What other options are available in place of WiFi, please?
Halis Safa Turan in MATLAB Answers
上次活动时间: 2022-4-2

Hello everyone I want to control my led which is connected to arduino. I have esp8266 module I can send data to thingspeak with this module but I couldn't retrieve data from thingspeak. What is the easiest way for this application?
MATTHEW SKVASIK in MATLAB Answers
上次活动时间: 2020-12-21

Hello, I am new at all of this. I am using the Example Sketch from THinkspeak Library. I have a ESP8266 ESP-01, and a DHT11 sensor that I am trying to write to a Thinkspeak Dashboard. From the example code, I have all Keys working, and the wifi connecting. From the example code in the library , I do not know how to get the Arduino Uno's code with the DHT11 to talk to the wifi code that is loaded from the Thinkspeak Library onto the wifi board. As far as I can tell the example code is telling it to write random numbers to my channels, which it is successfully doing! However, how do I get the sensor's data to be loaded instead. Below is the code for the DHT11 that I am loading onto the Uno. How do I get it to talk to the wifi Board to then write it to the field/channels on the Thinkspeak site? My apologies if this is a basic question. #include <dht.h> #include <SoftwareSerial.h> SoftwareSerial mySerial(10, 11); dht DHT; #define DHTXXPIN 2 int ack; void setup() { Serial.begin(9600); mySerial.begin(9600); } void loop() { ack = 0; int chk = DHT.read11(DHTXXPIN); switch (chk) { case DHTLIB_ERROR_CONNECT: ack = 1; break; } if (ack == 0) { Serial.print("Temperature(*C) = "); Serial.println(DHT.temperature, 0); Serial.print("Humidity(%) = "); Serial.println(DHT.humidity, 0); Serial.println("-------------------------"); //------Sending Data to ESP8266--------// mySerial.print('*'); // Starting char mySerial.print(DHT.temperature, 0); //2 digit data mySerial.print(DHT.humidity, 0); //2 digit data mySerial.println('#'); // Ending char //------------------------------------// delay(2000); } if (ack == 1) { Serial.print("NO DATA"); Serial.print("\n\n"); delay(2000); } } //-------------Electronics-project-hub>com-------------//
Fabio Marzocca in MATLAB Answers
上次活动时间: 2020-2-7

Hi, I am sending environmental data (float) once every 30 minutes from a NodeMCU, so the speed rate is low. Since a couple of months I am experiencing 3-5 errors a day, returning code -304 (Timeout waiting for server to respond) or -301. I am sending data with this code (very straight-forward): ThingSpeak.setField( 1, t ); ThingSpeak.setField( 2, h ); ThingSpeak.setField( 3, p ); ThingSpeak.setField( 4, vdd ); int writeSuccess = ThingSpeak.writeFields( myChannelNumber, myWriteAPIKey ); Then I realized that the device was connected to the WIFi extender. If I connect it to the main router (Fritz 7490) WiFi, it does not incur in those errors. The extender is a NetGear EX7500, with no choice of special settings other than standard WiFi configuration. What could be the problem?

关于 ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.