arduino

Arduino sending sms in GSM sim900 error

亡梦爱人 提交于 2019-12-13 03:35:09
问题 I have an Arduino Mega 2560 and a sim900 gsm module. I interfaced them successfully and written the code. Its working, but I can only send 1 sms at a time in the while loop. That means when I write a while loop to execute the sendsms() 5 times by using a while loop. Only one sms is sent.. and it stops... The code is below: #include <SoftwareSerial.h> #include <String.h> SoftwareSerial mySerial(52, 53); void setup() { mySerial.begin(19200); // the GPRS baud rate Serial.begin(19200); // the

How to update the data-value= “adc” on the gauge from the server?

回眸只為那壹抹淺笑 提交于 2019-12-13 03:23:14
问题 I'm using an NodeMCU (ESP8266) and Arduino IDE. The sketch part works, I can see the analog reading on the serial monitor as I move the pot. The webserver index.html is in the SPIFFs file system. When connected and server is loaded I can see the gauge on the browser but no movement from the needle is displayed. My goal is to get the ADC Reading and update the needle on the gauge. This is what I have so far, this is a sample from https://rawgit.com/Mikhus/canvas-gauges/master/examples/issue-63

Arduino ethernet communication

让人想犯罪 __ 提交于 2019-12-13 02:47:41
问题 Is it possible to get sensor output from Arduino via Ethernet connection and to send data to Arduino via Ethernet? So basically can "replace" serial port with Ethernet port? 回答1: The typical way to do this is with an Arduino Ethernet shield, a small hardware module that plugs into your Arduino board: http://arduino.cc/en/Main/ArduinoEthernetShield Updated: One very common approach for client to server communication would be to use HTTP over TCP/IP. See this example on the Ardunio site of a

Connecting Sparkfun ESP8266 Thing to Azure IoT Hub

不想你离开。 提交于 2019-12-13 02:47:06
问题 I am currently trying to connect my Sparkfun ESP8266 Thing to my Azure IoT Hub. I have successfully set up my hub, and am following this tutorial on how to connect the Thing to my Azure IoT Hub: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-sparkfun-esp8266-thing-dev-get-started Unfortunately I keep getting the error: 'StaticJsonBuffer' was not declared in this scope Arduino: 1.8.5 (Windows 10), Board: "SparkFun ESP8266 Thing, 80 MHz, 512K (no SPIFFS), v2 Lower Memory, Disabled, None

Android & Bluetooth & Arduino

戏子无情 提交于 2019-12-13 02:26:09
问题 I am trying to display sensor data on my Android phone (target 4.3) received from a transmitting arduino type device. The transmission takes place via Bluetooth. I am able to connect to the arduino type device and even share data, however for some reason I am having synchronization issues. The way the arduino is setup right now, after a successful connection it waits for a byte to be received from my phone (unsigned byte value 255), when it receives this byte it responds by sending a packet

Is arduino suitable for high frequency application?

烈酒焚心 提交于 2019-12-13 02:25:10
问题 Can I use the arduino for an application with a frequency of 4 MHz? I need to create a clk with this frequency and send and receive data on the rising and falling edges. and it is not a normal SPI interface I have my own conditions so I need to do it manually. If it is not suitable, is it technically possible? 回答1: The maximum PWM you could generate with an arduino Mega 2560 is 62500 Hz. I don't think you can go beyond that. Method You can use the internal SPI so with a 16MHz oscillator you

Parsing function for comma-delimited string

陌路散爱 提交于 2019-12-13 02:24:52
问题 Suppose I have a string like this "cmd,param1,param2" . The String is the Arduino String type. https://www.arduino.cc/en/Reference/String I want to extract each of the substrings separated by commas. I have successfully written the code for a specific case like this. Here's the code; String = str_data('cmd,param1,param2'); int firstCommaIndex = str_data.indexOf(','); int secondCommaIndex = str_data.indexOf(',', firstCommaIndex+1); String cmd = str_data.substring(0, firstCommaIndex); String

Confusing regarding function interpretation

寵の児 提交于 2019-12-13 02:04:19
问题 I'm trying to interface a 4x4 keypad with a TFT display. I want to implement a keypad event listener such that the appropriate screen will be loaded each time a key is pressed. The event listener will be keeping track of which screen is currently loaded, and will be listening for specific key inputs. The keypad event listener is defined (and will be called in the setup() function in my main arduino sketch (I'm using Atmel Studio + Visual muicro arduino plug-in. The code is written in C++):

Arduino and RGB LEDs

删除回忆录丶 提交于 2019-12-13 02:02:03
问题 Suppose I have an array: int rgbcolors = {{R1,G1,B1},{R2,G2,B2},{R3,G3,B3},{Rn,Gn,Bn}} How do I cycle through the values of this array by pressing 1 button on the remote? So pressing once, gives the first {R1,G1,B1}, pressing twice, gives {R2,G2,B2} etc... My current void loop for predefined colors: if (irrecv.decode(&results)) { int i = 0; int j = 0; int k = 0; unsigned int val = results.value; irrecv.resume(); switch(val) { case button1: //RED analogWrite(RedPin,255); analogWrite(GreenPin,0

Getting a “section type conflict” using M2tklib and glcd

♀尐吖头ヾ 提交于 2019-12-13 01:29:50
问题 I need some help to resolve a "section type conflict" in an arduino program I am writing. I have a short example code that produces the error: #include <glcd.h> #include "M2tk.h" #include "utility/m2ghglcd.h" #include "bitmaps/allBitmaps.h" // Definitions of Main Menu M2_LABEL(el_label_MainMenu,NULL,"Main Menu"); // Construct Main Menu List M2_LIST(list_main_menu) = {&el_label_MainMenu}; M2_VLIST(el_list_main_menu,NULL,list_main_menu); M2_ALIGN(el_main_menu, "W64H64", &el_list_main_menu);