Most Popular

1500 questions
5
votes
3 answers

How to power an Arduino using automated mains/rechargeable battery switching?

I'd like to power my Arduino circuit like a smartphone. That is: When the device is unplugged, power by rechargeable battery When the device is plugged in, power by mains and charge battery at the same time I'd like to not go the expensive shield…
Ana
  • 480
  • 2
  • 7
  • 13
5
votes
2 answers

Arduino onboard LED pin number as a constant

To use the onboard LED on an Arduino one usually has to know the pin number (13 in most cases), but is there a constant in the Arduino IDE one can use as well? So is it possible to use something like int LED = ONBOARDLED; instead of using int LED =…
bastelflp
  • 189
  • 1
  • 1
  • 10
5
votes
1 answer

Why can't most servos rotate more than around 180°

I was looking how a servomotor works. I realized that a standard servo can only turn up to 180°, but I didn't understand why. Is it because of the potentiometer?
roshan timsina
  • 117
  • 2
  • 6
5
votes
1 answer

How does Arduino distinguish between SPI programming data and regular data?

The Arduino can be programmed using SPI without a boot loader. Without a boot loader, the Arduino starts running its sketch right away. So, how does the Arduino know that it is being programmed via SPI vs regular SPI traffic already present on the…
Ana
  • 480
  • 2
  • 7
  • 13
5
votes
2 answers

error while loading libtinfo.so.5 - SOLVED

I just installed the 1.6.7 version and want to upload it a sketch to Arduino UNO hardware. I get error message: /home/pali/Irataim/TarBalls/Arduino/arduino-1.6.7/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libtinfo.so.5:…
user18811
  • 51
  • 1
  • 1
  • 4
5
votes
2 answers

How do I calibrate an ESC after connecting it to an Arduino?

I'm trying to connect an Arduino to an Electronic Speed Control and failing horribly. I'll explain what I've done so far, and then I'll explain the problem. Before we get there, here's the list of parts I'm using: Arduino Uno (genuine) 6V to 8.4V…
5
votes
3 answers

Works with gcc, not with Arduino. error: taking address of temporary array

I need to hard code 8 byte addresses into char arrays of length 8. This must be done many places in my code (in function scope), so I have tried to come up with a one-liner. The following works perfectly in C when compiling with gcc. char…
Mads Skjern
  • 1,125
  • 3
  • 13
  • 23
5
votes
3 answers

Return value of 0 if value is less than zero

Background: I am using an analog pressure sensor with a range from 0-100PSI returning voltage values .44v to 4.44v. It's open air (or 0 PSI) voltage on the signal pin is .47 volts. I have a function that subtracts that .47v (to make zero) and then…
TheAutomator
  • 335
  • 3
  • 12
5
votes
3 answers

Clock drift - is the precision of the crystal the only culprit?

I've a wall clock (sorry, code's a mess, look for updateClockVars) which makes use of the Timezone library (and ultimately Time). Nothing fancy, call millis() every loop; turn to Hrs, Mins, Secs; display on LEDs. The magnitude of the drift I am…
kaay
  • 223
  • 3
  • 9
5
votes
4 answers

Two arduinos one power source

I was surprised that this question had no answer on Stack Exchange and I can't find much about it elsewhere so, in the hopes that it will be useful to people other than myself, I'd like to ask: How can one power two arduinos using the same power…
xeuari
  • 87
  • 2
  • 2
  • 8
5
votes
1 answer

FCC Certification

I noticed that both the Uno and Wifi101 are FCC certified. Does this mean that these components can actually be used in commercial applications? This never really occured to me before I noticed the markings. I'm sure there is more to a commercial…
acpilot
  • 643
  • 2
  • 12
  • 25
5
votes
1 answer

How to append float value of into a string ?

I have a float variable lng = 33.785469 and lat = 78.126548. Now can I convert them to String and append in a String variable "my_location" as "your location is \nlng = 33.785469 \nlat = 78.126548". I was trying to do this with char charVal[5];…
Anum Sheraz
  • 191
  • 1
  • 4
  • 11
5
votes
2 answers

Can an L293D motor driver shield do microstepping?

I bought a L293D motor driver shield and have used it with a pre-made sketch for driving a pair of stepper motors, but I'm not familiar with its capabilities. The sketch I've used so far doesn't use microstepping when it's set up for this shield…
Mar
  • 288
  • 2
  • 5
  • 13
5
votes
2 answers

How to stop Arduino from reseting after serial connection lost

If I connect to an Arduino Uno via a serial console to read debugging statements and then disconnect, the Arduino appears to reset. How do I stop this from happening? I'm trying to program an Arduino to receive a "shutdown" signal from a Raspberry…
Cerin
  • 1,618
  • 2
  • 24
  • 41
5
votes
1 answer

ATTiny84 blink mystery

Novice mode, please. I programmed my ATTiny84 using Arduino Ethernet (Arduino IDE 1.6.7) using https://github.com/damellis/attiny branch - 1 MHz internal oscillator mode. I uploaded ISP sketch to Arduino with all cables disconnected (first I did it…