Most Popular
1500 questions
10
votes
1 answer
How to reset Arduino from software
As you know, the Arduino IDE resets the Arduino when the Serial Monitor is opened. I want also my program to do it. But I don't know how.
I examined the source code of the Arduino IDE (Serial.java & SerialMonitor.java), but I can't find where it…
Bhoke
- 321
- 3
- 11
10
votes
1 answer
Counting pulses with interrupt
I have been trying to count pulses from a 12,500 Hz square wave to trigger an output. Here's the code I have so far. When the Arduino is reset it prints 315 to the serial over a 25 ms sample. 315 x 40 = 12600. Which seems to me it's working…
Brandon Whosville
- 103
- 1
- 1
- 5
10
votes
3 answers
How can I program an arduino in pure C/C++?
I am a beginner and I want to learn AVR C/C++. Can I do this using an Arduino? (I'm asking this because I already have one).
If so, could someone tell me using which IDE can I write code in pure C/C++ and then flash it to the Atmega328P on the…
ICRed
- 101
- 1
- 1
- 3
10
votes
4 answers
What is the proper way to make library pin mappings configurable?
I am working with some libraries that provide APIs for interacting with specific hardware chips (that makes these drivers?). However, different custom boards or shields will have the chip mapped to different pins meaning the library needs to be…
vossad01
- 203
- 1
- 6
10
votes
3 answers
Convert to and from Unix Timestamp
What is the best way to convert between date, hours, min, seconds to Unix timestamp in milliseconds in Arduino? I need to have this conversion, since I'm using RTC (date, hours, min, secs etc) and communicating Unix timestamp over BLE
I found some…
Dzung Nguyen
- 417
- 1
- 8
- 17
10
votes
2 answers
How to send numbers to Arduino UNO via Python 3 and the module serial
I am new to Arduino (and computer programming in general), so I apologize if this question looks silly.
Once I set up a basic arduino-LED connection, I have problems sending INTEGERS to arduino through the serial port. I can easily send characters…
mickkk
- 281
- 3
- 4
- 9
10
votes
5 answers
Can I make delayMicroseconds more accurate?
I'm trying to bit bang DMX data and that requires 4us pulses. Not having much luck with the results I'm checking to see how good the Arduino is at delaying... Seems to be pretty terrible at it.
Here's a quick little test I did:
unsigned long…
bwoogie
- 203
- 2
- 9
10
votes
8 answers
What's the difference between analogWrite and digitalWrite?
As the title states. What's the difference between the two?
analogWrite(pin,0-255) vs digitalWrite(pin,LOW-HIGH)
pijemcolu
- 127
- 1
- 1
- 8
10
votes
5 answers
Why is my real time clock getting the wrong time from my PC?
I want my real-time clock to set its time as the time on my PC. However, when I run the following sketch, the real-time clock reports the time as being 32-33 seconds earlier than my PC says the time is.
#include
#include…
lunafish
- 101
- 1
- 1
- 4
10
votes
1 answer
Controlling water temperature accurately
I have following setup:
Arduino Duemilanove
Small water heater connected with optical relay (PWM is ok)
Waterproof DS18B20 temperature sensor
Unknown amount of water (but temperature sensor and heater are always underwater).
How can I accurately…
Olli
- 265
- 2
- 10
10
votes
4 answers
Arduino compatible's serial port not showing Mac OSX
I bought an Arduino-compatible Freaduino board atmega8 (I selected the board type as Arduino ng or older atmega8). I installed the Arduino IDE on Mac OS X and the FTDI drivers. But my serial port looks like this when I connect the board:
And when I…
Rajath
- 225
- 2
- 4
- 10
10
votes
4 answers
Arduino Nano not responding with yellow led blinking fast
Update: I started playing with a genuine Deumilanove and exactly same problem happened to it - d13 led blinking, but avrdude says stk500_recv(): programmer is not responding
I uploaded a largish sketch ~15kb to Arduino Nano v3.0 (clone) and that…
Boycott Russia
- 311
- 1
- 2
- 9
10
votes
3 answers
How to get current time and date in arduino without external source?
I'm working on a project using Arduino Uno and SD card shield.
I'd like to store a variable at a specific time everyday in the SD card. How can I get the current time in Arduino ?
Any help would be appreciable.
NOTE : Arduino is NOT connected to PC.
Mohamed Mbarki
- 131
- 1
- 2
- 6
10
votes
3 answers
Digital Read Serial tutorial - calculating the resistor value
The Arduino Digital Read Serial tutorial guides you through the wiring of a simple button. My questions are centered around the resistor.
Why is the resistor necessary?
I think I understand this, but correct me if I am wrong. To ensure that the…
Rip Leeb
- 377
- 1
- 10
10
votes
2 answers
Why is int only 2 bytes?
When using C/C++ on other platforms, the int type is typically 4 bytes (or potentially more). However, on Arduino, it's only 2 bytes.
Why is it different? Does it affect performance if I always use the 4 byte long instead?
Peter Bloomfield
- 10,972
- 9
- 48
- 87