arduino-ide

Arduino: Can import library in ino, but not in C++

拜拜、爱过 提交于 2019-12-13 00:43:57
问题 I'm trying to use a UTFT library in Arduino. If I work with a single .ino file and include the library there, everything works fine, like this: example.ino #include <UTFT.h> UTFT myGLCD(QD220A,A2,A1,A5,A4,A3); ... However, if I create a .cpp and a .h file, like this: example.h #include <UTFT.h> example.cpp #include "example.h" UTFT myGLCD(QD220A,A2,A1,A5,A4,A3); ... I get an error: UTFT does not mean a type If I copy the whole TFT library to the project directory, and use #include "UTFT.h" in

cylon.js & arduino uno: execute program without cable connection to PC

萝らか妹 提交于 2019-12-11 13:37:30
问题 I am new to this field, so this might be an odd question. We can write a code(say blinking lights) in the aduino IDE and upload it to arduino and we can disconnect from the pc and the program will run. (blinking will happen). Now when we are using cylon.js and write the program and execute say $ node blinking.js then as long as the arduino is connected to the pc(or laptop) the blinking happens and when I kill node js or disconnect arduino from pc the blinking stops. (this is how its suppose

Cannot upload data to firebase using Nodemcu

江枫思渺然 提交于 2019-12-11 10:14:38
问题 My sensor is collecting data correctly but is not pushing the data to Firebase. As expected Firebase.failed returns true but Firebase.error is empty. Please help me with the code as my project is due in three days. I have tried changing the fingerprint in FirebaseHttpClient.h file. I have also tried changing the Firebase HOST with and without "/". #include "DHT.h" #include <FirebaseArduino.h> #include <ESP8266WiFi.h> #define FIREBASE_HOST "your-project.firebaseio.com" #define FIREBASE_AUTH

My Arduino stops after 1 minute wait

旧城冷巷雨未停 提交于 2019-12-10 16:32:43
问题 I do have a small Arduino programming that simply stops after first loop. I might overlook something...but I'm simply clueless about what is happening. Here is the code int led = 13; //int led = 10; unsigned long windtime = 1000 * 2; // 2 seconds unsigned long pausetime = 1000 * 60; // 1 minute // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); Serial.begin(9600); } // the loop routine runs over and over again

Xbee Node Discovery Response

感情迁移 提交于 2019-12-10 11:58:39
问题 I'm trying to discover devices, from a coordinator, in my network. So I sent an ND command to the coordinator and I'm correctly receiving response from other Xbee. The next step will be to store the information I've received in a web application, in oder to send commands and data. However, what I'm still missing is some parts in the frame respose. So far I've mapped the frame like this: 1 7E start frame ===== =================== MESSAGE LENGHT 2-3 0x00 0x19 -> 25 ===== ===================

Arduino readString(); code runs slow

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 02:32:19
问题 I have the following code which I need to execute quickly, yet its taking a lot of time to change the value, anyway over way of making this task quicker? I am using indexOf() and substring() to accomplish this task. This is for changing the strip LED colors. // declare LED Series A Pins R-G-B (PWM Pins) int const AledRedPin = 6; int const AledGreenPin = 5; int const AledBluePin = 3; // declare LED Series B Pins R-G-B (PWM Pins) int const BledRedPin = 10; int const BledGreenPin = 11; int const

How to measure the amount of memory or RAM consumed by a code on Arduino Mega or Due

不羁岁月 提交于 2019-12-08 01:54:39
问题 Can anybody tell me how to measure the consumed RAM for a particular code running on Arduino Mega or Due. 回答1: There is two kinds of numbers to this question: Global static usage and current run time . The static estimated usage can be determined by adding the following line to (if it does not already exist) .\arduino-1.5.5\hardware\arduino\avr\boards.txt uno.upload.maximum_ram_size=2048 This then allows the compiler to output the additional 2nd line in the following example in the IDE's

Mac OS 10.9 doesn't display USB modem for Arduino

喜夏-厌秋 提交于 2019-12-07 18:57:47
问题 I am trying to select /dev/tty.usbmodem on my Arduino Lenardo device. The OS is Mac OSX 10.9. The problem is that it isn't displaying. I even tried installing FTDI but it was no use. Update: sh-3.2# dmesg luetoothUSBDFU::probe IOBluetoothUSBDFU::probe ProductID - 0x821A FirmwareVersion - 0x0042 **** [IOBluetoothHostControllerUSBTransport][start] -- completed -- result = TRUE -- 0xdc00 **** **** [BroadcomBluetoothHostControllerUSBTransport][start] -- Completed -- 0xdc00 ****

Arduino 1.0.6: How to change compiler flag?

十年热恋 提交于 2019-12-07 09:20:54
问题 I'm currently working on a project using Arduino 1.0.6 IDE and it does not seem to accept C++ 11 std::array. Is it possible to change the compiler flag to make this work? 回答1: Using the IDE is very difficult to do that. I would advise you to go full command line by using Sudar's great Arduino Makefile. This way you'll be able to customise the compiler flags to your liking. I've also created the Bare Arduino Project to help you get started. The documentation covers a lot points, from

How to measure the amount of memory or RAM consumed by a code on Arduino Mega or Due

∥☆過路亽.° 提交于 2019-12-06 07:23:39
Can anybody tell me how to measure the consumed RAM for a particular code running on Arduino Mega or Due. There is two kinds of numbers to this question: Global static usage and current run time . The static estimated usage can be determined by adding the following line to (if it does not already exist) .\arduino-1.5.5\hardware\arduino\avr\boards.txt uno.upload.maximum_ram_size=2048 This then allows the compiler to output the additional 2nd line in the following example in the IDE's result window Binary sketch size: 25,880 bytes (of a 32,256 byte maximum) Estimated used SRAM memory: 990 bytes