arduino-ide

Arduino 1.0.6: How to change compiler flag?

风流意气都作罢 提交于 2019-12-05 17:23:56
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? 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 installing the latest avr-gcc toolchain to how to use the repository, compile and upload your code. If you find

Cannot program ESP8266

孤街浪徒 提交于 2019-12-05 00:45:12
问题 Blue led is blinking after powering up the module, the red one stays on, I can even connect to it via wifi. But I cannot program it. I tried Arduino IDE, different firmware flashers (Like NodeMCU, XTCOM). I'm using Arduino Mega. Here's my initial setup: VCC - 3.3 V on Arduino RST - nothing CH_PD - 3.3 V on Arduino TX - RX on Arduino (TX is transmitting data to RX, so I don't need a voltage divider, right?) RX - voltage divider (R1 = 10K, R2 = 20K) - TX on Arduino GPIO0 - GND on Arduino GPIO2

Arduino at 11.0592MHz. Modify Timer0, delayMicroseconds()

二次信任 提交于 2019-12-04 05:01:19
问题 I am using the ATMega328P at 11.0592MHz with the Arduino environment. I recognized that the delayMicroseconds() function is about 27% too fast. The reason is, that the code in wiring.c assumes that the clock peed is now 8MHz. Now I try to fix it. I found different posts but I am not sure what is the most Arduino compatible way. What can you recommend? Multiply the variable "us" in wiring.c with 1.27 if the F_CPU is 11.0592MHz? Easy but only affects delayMicroseconds and not millis(), micros()

ESP8266 for Arduino IDE (xtensa-lx106-elf-gcc) and std::map linking error

有些话、适合烂在心里 提交于 2019-12-04 04:00:02
问题 Is it possible at all to use map with ESP8266 for Arduino package? Here is my code: #include <map> typedef std::map<int, int> Items; void setup() { Items items; items[2]=5; //items.emplace(4,5); } void loop() { } Here is compilation/linking erorrs: Arduino: 1.6.5 (Windows 8.1), Board: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS)" sketch_oct31a.cpp.o: In function `loop': C:\Program Files (x86)\Arduino/sketch_oct31a.ino:11: undefined reference to `std::_Rb_tree

Cannot program ESP8266

依然范特西╮ 提交于 2019-12-03 15:57:04
Blue led is blinking after powering up the module, the red one stays on, I can even connect to it via wifi. But I cannot program it. I tried Arduino IDE, different firmware flashers (Like NodeMCU, XTCOM). I'm using Arduino Mega. Here's my initial setup: VCC - 3.3 V on Arduino RST - nothing CH_PD - 3.3 V on Arduino TX - RX on Arduino (TX is transmitting data to RX, so I don't need a voltage divider, right?) RX - voltage divider (R1 = 10K, R2 = 20K) - TX on Arduino GPIO0 - GND on Arduino GPIO2 - nothing GND - GND on Arduino Then I tried uploading a sketch from the Arduino IDE and got the

What is the secret of the arduino `yield()`function?

半城伤御伤魂 提交于 2019-12-03 11:33:07
问题 The Arduino docs explain yield() at https://www.arduino.cc/en/Reference/Scheduler with regards to the Due. Apparently it is part of the Scheduler library: #include <Scheduler.h> However, I can call yield() on my Nano or ESP8266 without including the Scheduler lib -- but only in my main program, not inside include files. Also, the include does not work on my non-Dues. What's the secret that I'm missing about yield() or- what does yield() do on Arduino platforms other than Due? 回答1: However, I

What is the secret of the arduino `yield()`function?

喜你入骨 提交于 2019-12-03 02:00:42
The Arduino docs explain yield() at https://www.arduino.cc/en/Reference/Scheduler with regards to the Due. Apparently it is part of the Scheduler library: #include <Scheduler.h> However, I can call yield() on my Nano or ESP8266 without including the Scheduler lib -- but only in my main program, not inside include files. Also, the include does not work on my non-Dues. What's the secret that I'm missing about yield() or- what does yield() do on Arduino platforms other than Due? However, I can call yield() on my Nano or ESP8266 without including the Scheduler lib The yield() function is also

Arduino at 11.0592MHz. Modify Timer0, delayMicroseconds()

我们两清 提交于 2019-12-02 07:43:56
I am using the ATMega328P at 11.0592MHz with the Arduino environment. I recognized that the delayMicroseconds() function is about 27% too fast. The reason is, that the code in wiring.c assumes that the clock peed is now 8MHz. Now I try to fix it. I found different posts but I am not sure what is the most Arduino compatible way. What can you recommend? Multiply the variable "us" in wiring.c with 1.27 if the F_CPU is 11.0592MHz? Easy but only affects delayMicroseconds and not millis(), micros(), delay(), etc. Change the prescale factor maybe from 64 to ??? Other ideas or guides? Thank you in

How to print Integer alongside String Arduino?

不想你离开。 提交于 2019-12-02 04:39:15
I am trying to print an integer alongside a string but it's not really working out and am getting confused. int cmdSeries = 3; Serial.println("Series : " + cmdSeries);// That's where the problem occur In visual basic we used to do it this way: Dim cmdSeries As Integer Console.Writeline(""Series : {0}", cmdSeries) So i've tried it with Serial.println but it returns this error : call of overloaded 'println(const char [14], int&)' is ambiguous Can anyone help my out, I want to achieve this without using any libraries and in a clean way. There is a huge difference between Arduino String class and

How to print Integer alongside String Arduino?

半城伤御伤魂 提交于 2019-12-02 02:10:52
问题 I am trying to print an integer alongside a string but it's not really working out and am getting confused. int cmdSeries = 3; Serial.println("Series : " + cmdSeries);// That's where the problem occur In visual basic we used to do it this way: Dim cmdSeries As Integer Console.Writeline(""Series : {0}", cmdSeries) So i've tried it with Serial.println but it returns this error : call of overloaded 'println(const char [14], int&)' is ambiguous Can anyone help my out, I want to achieve this