Most Popular

1500 questions
10
votes
2 answers

Is there a non-float alternative to pow()?

I've scoured the LANGUAGE REFERENCE in the Arduino web-site, and I can't find a non-Float equivalent to pow() I've got to be missing something big, but for the life of me, I'm stumped! I found pow() in the FUNCTIONS column under the Math heading…
user16841
10
votes
2 answers

Does the Arduino Uno have two crystals?

Take a look at this picture: I think most of use agree that the "big silvery" thing on the board (red) is the famous 16 MHz crystal of the Arduino. That's what I've believed until very recently. I was bored so I looked at my Arduino Uno, and saw…
Dat Ha
  • 2,933
  • 6
  • 24
  • 46
10
votes
1 answer

int VS uint8_t VS uint16_t

This question is quite clear. What are the differences between an int, an uint8_t, and an uint16_t. I know it has to do with bytes and memory but can someone clarify me a bit? Things I want to know: 1- How much memory does each take. 2- When to use…
Dat Ha
  • 2,933
  • 6
  • 24
  • 46
10
votes
5 answers

How to I make the Tx and Rx pins on an ESP-8266-01 into GPIO pins?

When programming an ESP-01 with Arduino IDE, how can I make the Tx and Rx into a generic I/O pins reliably? I think there's a command to swap the Tx and Tx with other pins. I tried serial.swap() but it didn't work. So how to get done with Arduino…
vzxc
  • 101
  • 1
  • 1
  • 4
10
votes
5 answers

How to expand program memory on an arduino?

Sometimes I run out of space of the program size for the embedded C program that I want to put on an arduino. So what chip do I need to expand the program memory of the arduino so that I can use bigger C programs with my arduino?
RS2322016
  • 384
  • 1
  • 3
  • 12
10
votes
4 answers

What is the work of pulseIn?

I have code for an ultrasonic sensor which I found from a site. Here is the code: #define trigPin 12 #define echoPin 13 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } void loop() { int duration,…
shajib0o
  • 551
  • 2
  • 5
  • 9
10
votes
3 answers

Custom Arduino board beeps and process freezes while I'm uploading a sketch to it. Why?

The strangest thing is happening to a standalone Arduino board that I designed and built. The board (whose schematics are below) has the following features: It has a ATmega328P with a 5V voltage regulator and usual circuitry when set up as a…
Ricardo
  • 3,380
  • 2
  • 25
  • 54
10
votes
1 answer

How to simply close a tab?

How can one close a tab in the Arduino IDE? There is a Tab button (little triangle) with the Option "Delete"(kind of misleading term). There is no "Close" option. And the "Delete" option doesn't do the job for me either, because the tabs are…
Anton Alice
  • 203
  • 1
  • 2
  • 4
10
votes
3 answers

Upload code on Arduino Leonardo using command line

I'm trying to upload a compiled .hex file on an Arduino Leonardo, using the terminal. Uploading a sample code using the Arduino IDE works well, and from the Arduino IDE I got the upload command avrdude -C/etc/avrdude.conf -patmega32u4 -cavr109 -v -v…
Alex
  • 315
  • 2
  • 3
  • 9
10
votes
5 answers

How do I write an Arduino sketch and an Android application to talk to each other over a standard USB cable?

How do I write an Arduino sketch and an Android application to talk to each other over a standard USB cable?
David Cary
  • 1,112
  • 8
  • 23
10
votes
1 answer

How to design and debug a custom I2C master-slave system?

How to proceed, when in need of a custom I2C master-slave system? What are the design criteria to apply? What are the debugging tools one can use to troubleshoot problems?
Igor Stoppa
  • 2,125
  • 1
  • 15
  • 20
10
votes
3 answers

ATtiny85 communication with computer through USB

I am trying to receive and send some data from a computer to an ATtiny through USB. Can an ATtiny85 IC communicate with a computer through USB? If yes, how should it be connected?
10
votes
1 answer

Both red and blue led of ESP8266 stays on

I've connected ESP8266 to Arduino UNO. After a getting a huge trouble I successfully managed to run some AT commands. I have also tested AP mode. Then I got some trouble with software serial communication with Arduino and decided to change baud-rate…
palash
  • 137
  • 1
  • 2
  • 7
10
votes
4 answers

How to really shrink a sketch

I want to make a sketch that is as small as possible, for test purposes. The problem is, when i compile the BareMinimum sketch (with an empty setup and loop), i get 466 bytes for the Uno and a whopping 4,242 for the Leonardo. Is there any way to…
TheDoctor
  • 3,499
  • 1
  • 22
  • 39
10
votes
4 answers

How to interconnect multiple Arduinos with a Rpi to control home-lights/switches

While planning the lightning infrastructure (wall-switches and lights) of my new home (it's still under-construction) I choosed to go through the "automated route" way and due to my background (I'm an "old" system/network administrator with…
Damiano Verzulli
  • 454
  • 6
  • 18