Questions tagged [arduino-ide]

This is for questions about the official IDE. The open-source IDE makes it easy to write code and upload it to any Arduino board. It runs on Windows, macOS and Linux.

Filter by
Sorted by
Tagged with
2
votes
1answer
9k views

Read int from Serial

with the following sketch I should be able to read and store what is entered in the Serial monitor void setup() { Serial.begin(115200); while(!Serial); } void loop() { Serial.println("Enter ...
2
votes
2answers
5k views

Since double and float represent the same data type (usually), which is preferable?

It looks like on ATMega based boards, float and double are equivalent 32-bit (4-byte) data types. However, on the Arduino Due, doubles are 64-bit (8-byte) where floats are 32-bit (4-byte), same as ...
2
votes
1answer
200 views

How can I make Arduino IDE use Atmel's provided toolchain? (Linux/Ubuntu)

I have an Arduino based board using ATmega168PB, but so far only Atmel's provided toolchain supports this microcontroller. I can download the toolchain from Atmel's website, but I am not sure how to ...
2
votes
2answers
6k views

Interrupt on Analog Port - ESP8266 w/ Arduino

I'm trying to implement interrupts in my program. It essentially is constantly reading a photo-resistor and if it exceeds a certain threshold, we should send an update to our database. I'm struggling ...
2
votes
2answers
5k views

Empty char variable

How do I empty all the values inside a variable char array[256];? I tried a for loop assigning an empty value at each iteration, but it doesn't compile.
2
votes
1answer
6k views

ESP8266 wifi module sending data via jQuery

Hey all I have the ESP8266 module and I have already set it up and it's working good. However, when I run this HTML page code here: <html> <head> <title>ESP8266 LED ...
2
votes
2answers
98 views

I am running 1.6.5, but the folder says 1.6.3? [closed]

I just downloaded the latest version of the Arduino software (1.6.5). However, when I look into the Application Support folder under Library (I have a mac), I find that I have a folder named 1.6.3: ...
2
votes
2answers
267 views

How to prepare data structures and classes?

How can I port these structures to arduino ide, I also get error when I define pointers // pointer to classes example #include <iostream> using namespace std; class Rectangle { int width, ...
2
votes
2answers
97 views

Smallest microcontroller?

I am looking for a microcontroller that is small (like a attiny10) which is the smallest one I could find. Requirements I need: analogRead on 1 pin, 7 pins for analogWrite to micro leds so in total 10 ...
2
votes
1answer
1k views

Need help: Cast from 'char*' to 'uint8_t {aka unsigned char}' loses precision [-fpermissive]

I'm trying to convert the string that I receive from the Websocket to uint8_t that I can copy to the data bytes of CAN protocol frame. I'm using an ESP32 chip and programming it on an Arduino IDE. The ...
2
votes
1answer
58 views

FastLED not performing as expected

I'm fairly new to working and programming with arduinos. The project I am working on is a digital clock which uses a string of WS2812 leds to light up the correct numbers. Each digit consists of 7 ...
2
votes
1answer
194 views

I am trying to read input from 5th PIN of PORT B?

In a nutshell i want to read a PORTB 5th pin without using digitalRead API ( i am trying to learn baremetal using arduino-uno-r3) Just to Learn How internal register works i did not used digitalRead ...
2
votes
1answer
2k views

NodeMCU second HARDWARE serial TX as a debug port

I'm using a NodeMCU board to send commands to my home electricity switching box - using RS485 communication. For that, I've connected MAX485 TTL-to-RS485 converter module to my TX and RX pins. ...
2
votes
1answer
1k views

Digispark ATtiny 85 erases flash after power loss

I have some issues with my Digispark ATtiny85 board. If I upload the blink sketch for example the LED starts blinking and everything looks fine. But as soon as I unplug the Digispark from the USB ...
2
votes
2answers
14k views

Arduino master/slave communication using RS485

I am using Arduino Uno as a Master Device and 3 Arduino Unos as slave devices. I am sending data from each slave to master after every 3 seconds continuously, and is going to execute further logic ...
2
votes
3answers
2k views

Value of uninitialized EEPROM in ESP8266?

In my limited testing it appears that the EEPROM in the Wemos D1 is not initialized to 255 like the specs say is the case for AtMega based Arduinos. In fact, the values look to be more-or-less random. ...
2
votes
1answer
88 views

Which platform is better to debug Arduino memory problems? Linux or Windows?

I am developing a product. I developed every module in the firmware individually. Now I am integrating them but getting memory issues. I am not able to see how the memory is allocated inside the MCU ...
2
votes
1answer
3k views

How to transmit string data using the rc-switch library?

I am using the rc-switch library for sending and receiving data. In rcswitch library, there is no method to send string data. I am using below method to send the string message in char buffer. ...
2
votes
1answer
848 views

Pro Micro recognised as Micro (win10, IDE 1.8.1)

I just got this pro-micro clone 5V and it's my first pro micro ever. After reading lots of discussions about how easy it is to brick and how it's just a smaller Leonardo, I've also found tutorials ...
2
votes
1answer
140 views

Ultrasonic sensor confusion

Here is a code snipet for ultrasonic sensor digitalWrite(trigpin,HIGH); delayMicroseconds(10); digitalWrite(trigpin,LOW); duration=pulseIn(echopin,HIGH); Assume trigpin and echopin pins are already ...
2
votes
1answer
2k views

How does DDRD |= _BV(PD2) differ from digitalWrite(2,HIGH)?

I'm attempting to copycat the work of Louis Frigon's Toyota Aux Enabler. I have (with a lot of help on this site) managed to begin capturing and understanding messages on the AVC-LAN bus, but I can't ...
2
votes
2answers
299 views

Purposely create compile error to fail the upload [closed]

I would like to create a compile error so sketch does not upload in certain cases. I have written a library with a function that adds pins being used to an array. If the same pin is used twice I ...
2
votes
1answer
2k views

Vcc measurement with internal 1.1V reference fails on 3.3V powered Atmega328

I need to monitor a battery plugged to an ATmega running on standalone mode. I use the "ATmega on a breadboard (8 MHz internal clock)" bootloader. More info here When the ATmega is powered with 5V ...
2
votes
3answers
503 views

How do I create global pointers with low memory overhead?

Problem I have a few large objects in my code that need global visibility, but creating them seems to eat up memory significantly faster than simple math would dictate, and furthermore, using them ...
2
votes
1answer
154 views

Arduino IDE compiles, UECIDE not

I'm rewriting a personal project and it doesn't compile under UECIDE 0.9.1, but it does with Arduino IDE 1.8.5. Target is NodeMCU 0.9 with default options. Arduino IDE 1.8.5 Archiving built core (...
2
votes
1answer
75 views

Arduino Due custom platform for school and library installation

I have made a custom-development hardware for our school, where you can plug in an Arduino Due. It is mainly for driving all kind of motors and reading sensor signals. Therefore I added a custom SAM ...
2
votes
2answers
80 views

How to add this old BASIC code snippet to work in Arduino C++ for FastLED?

I've been trying to implement this old code that randomly transitions to RGB color into my Arduino board that uses FastLED. Static Col1, Col2, Col3 As Integer Static C1, C2, C3 As Integer If (Col1 = ...
2
votes
3answers
2k views

Nano-like Board - Programmer Not Responding [duplicate]

I am trying to upload a basic sketch to my unofficial Nano-like board and keep getting this error. I understand that it is a generic connection error between the Arduino and my PC, but can't figure ...
2
votes
1answer
760 views

Error in IR receiver project

I'm trying to receive remote information with an IR receiver and this is my code: #include <IRremote.h> int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { ...
2
votes
1answer
112 views

millis() vs creating a “long” variable

I think my issue is not fully understanding how the millis() function works; I am wondering the difference between simply creating a variable such as long fake_millis ++ ; vs using millis()?
2
votes
2answers
281 views

Native function name w/o parens — expected behavior?

I wrote a sketch that used the millis() function in several places. I got odd behavior because I inadvertently used the plain millis in one line, without the parens. It evaluated to zero when running. ...
2
votes
2answers
694 views

Unable to create a desired periodic signal with Arduino Mega 2560 and DAC0808

I wrote the code to produce the periodic signal by using arduino and DAC0808 where i turned on and off the respectively pins of PORTA by using a logic in iterative manner and created the periodic ...
2
votes
1answer
425 views

Arduino IDE fails without sudo

I use Arduino IDE 1.6.6 on Ubuntu 15.10. Starting the Arduino IDE without using sudo fails for both: uploading the code to the Arduino Uno starting the serial monitor The group I need to add my ...
2
votes
1answer
1k views

Why is Arduino STINO upload function not working?

I'm using sublime text for editing and modifying my arduino libraries. Sublime text is pretty pretty, useful and embed a very powerfull plugin system. Someone created an Arduino plugin for it. The ...
2
votes
2answers
178 views

Programming Questions / Capacitive Soil Moisture Sensor

Good day All, This is my first time posting to this forum and kind off my last resort as I would've liked to figure it out myself. I am trying to create a soil moisture probe which can be used on ...
2
votes
1answer
120 views

Remove blocking delay() toneMelody function?

I would like to change the delay() into a nonblocking function in the code below. I've implemented it (a part of a tutorial from arduino.cc) in my code, but the delay() is blocking the rest of my code....
2
votes
1answer
56 views

ESP8266, sporadically no write access to the file system

I have an ESP8266 project which reads my gas consumption. The hardware and the project run satisfactorily. Sporadically, the ESP8266 can no longer write to its file system and therefore cannot save ...
2
votes
1answer
81 views

Is it possible to split project into several folders?

It is possible to split the project into server files. However, it looks like they all must be in the same folder with the.ino file. Is it possible to split project into several folders? I’ve got ...
2
votes
2answers
260 views

ESP-01 + UNO won't detect gateway

Apparently, this combination of hardware won't accept anything other than WiFiEsp.h together with SoftwareSerial.h (if anyone knows something better/newer than these two, please let me know). Thing is:...
2
votes
1answer
134 views

Weird Arduino Code Problem

I'm currently getting started with Arduino, so I do not have very much knowledge. In this project I have a receiver and a transmitter with 2 buttons. So, I'd like to switch something to on, when I ...
2
votes
1answer
179 views

How to produce a .o file from code using Arduino IDE (primarily for LGPL3 compliance)

I spent a great deal of time looking for any posts regarding this and came up empty. The reason I needed to do this is that I am working on some proprietary code that will be released in an embedded ...
2
votes
4answers
3k views

Counting the number of pulses in a second

For my speedometer application, I want to count the number of pulses occurring every second and convert it to speed. So for that, I need to count the number of pulses occurring at a given input pin ...
2
votes
1answer
1k views

How to upload Arduino C code to mBot?

I am trying to program mBot using Arduino IDE. I am connected to the mBot using USB on COM7, I am able to upload a code created in mBlock 3.4.11 fine, using "Arduino Mode" as the editing mode. I would ...
2
votes
2answers
3k views

Why is there no hex file generated when I “build binary output” from the Arduino IDE?

I want to obtain the .hex file from my Arduino sketch. I have followed various guides but there is no .hex file in my output folder. How can I obtain my hex file? Here are my preferences: This ...
2
votes
1answer
1k views

Is it possible to add an additional board on Arduino Web Editor (create.arduino.cc)?

I'm using a board that can be programmed via Arduino IDE (a NodeMCU with ESP8266) and I've configured the Windows client successfully. I've added an additional board through "Preferences" menu by ...
2
votes
1answer
76 views

Custom boards list

Is there a simple way to create or modify my boards list? I find having a full library listing confusing. I have about 6 boards I program regularly, but using the listings from the board manager gives ...
2
votes
1answer
84 views

Why Liquid crystal display doesn't give output in code below?

I've been working on project for children showing the codes used by atc transponder. I've used a keypad and a 16×2 display , where user types a 4 digit code and display shows condition related to the ...
2
votes
2answers
169 views

Programming Micro controllers using Arduino ISP

Can I burn my Arduino Code into this: http://www.microchip.com/wwwproducts/en/ATSAM3A4C or something similar by just using just the Arduino ISP?
2
votes
1answer
106 views

Why are there two sets of tools and bootloaders in the Arduino IDE?

After digging around on a separate problem, I found that avrdude, avr-gcc and some more tools can be found in two different locations: (1): C:\Program Files\Arduino\hardware (2): C:\Users\<user&...
2
votes
1answer
2k views

Arduino Pro Mini RESET button suddenly stopped working

I am powering my Pro Mini(3.3V version) using an external battery (~6.5V 700mA) . I used to connect it to the RAW and GND pins on my pro mini and everything ran fine. Today when I powered up my ...

1
3 4
5
6 7
29