Most Popular

1500 questions
8
votes
2 answers

How precise is the timing of pulseIn()?

I've been using the pulseIn() function for processing PWM-based binary data encoding. It works well for distinguishing pulses which are significantly different lengths, e.g. 500us vs. 1500us. That makes it more than sufficient for handling typical…
Peter Bloomfield
  • 10,932
  • 9
  • 47
  • 87
8
votes
5 answers

How is stack memory used for fuctions and local variables?

I wanted to save some values to the EEPROM and also wanted to free up SRAM by avoiding some variable declarations, but EEPROM memory is byte wise. If I want to store an int value, I have to use some expressions repeatedly. I thought I would make…
Nafis Abdullah Khan
  • 229
  • 1
  • 4
  • 10
8
votes
4 answers

For which type of serial communication is Arduino Severino designed?

Arduino has become quite costly where I come from (2/3 of the price of Raspberry PI) so I have created an Arduino Severino clone. I had used the device with the RS-232 Usb-Serial converter. But after a (long) while, the device stopped working. My…
Tomáš Zato
  • 282
  • 5
  • 14
8
votes
2 answers

Male header pins on Arduino Uno

On my board, there are 12 (2 groups of 6, each group consistent of 3 rows of 2 pins) weird male header pins. What are these, and how would you use them?
Duncan
  • 183
  • 1
  • 6
8
votes
4 answers

Can't use enum as function argument

I declared my enum and called it Dir. I wanted to use value of that type in my function Move(). Here's the code: enum Dir { forward = 1, backward = 2, left = 3, right = 4 }; void Move ( Dir direction , int distance ) { direction =…
mnj
  • 209
  • 2
  • 5
8
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 doesnt do the job for me either, because the tabs are…
Anton Alice
  • 183
  • 1
  • 1
  • 3
8
votes
3 answers

Can I use arduino's 3.3 V output directly to esp8266?

I just bought esp8266 and ftdi usb driver, I want to power the esp8266 with Arduino's 3.3 V output, is that possible? I saw some tutorial on youtube in that they are suggesting us to use 3.3v regulator ic instead of directly power 3.3 V of Arduino…
8
votes
4 answers

Can I use Visual Studio instead of Arduino IDE?

I think that Visual Studio is a great product! I find the Arduino IDE is limited in its features. For example the Arduino IDE does not have: Code prediction Error highlighting Previews of #define values Peek at code definition Jump to code…
sa_leinad
  • 3,188
  • 1
  • 22
  • 51
8
votes
2 answers

How to use the analog comparator to determine when an analog pin has reached a certain voltage?

I am trying to find some information on how to use the analog comparator on an Atmega328 to detect when an analog pin has reached a certain voltage (3.16 volts). I cannot find any example code that says how to do this, although I have read that the…
3871968
  • 308
  • 1
  • 2
  • 10
8
votes
7 answers

Is there a way to replace an Arduino core function without modifying the Arduino code?

(Let's just skip the suggestions that it's the wrong idea and interrupts for a while...). Is there a way to replace the digitalWrite() method (for example) so I can add something more to happen in there? But the following rules must be obeyed: A…
P.W.
  • 317
  • 6
  • 15
8
votes
5 answers

Can I measure velocity from an accelerometer? How accurately?

I've bought this module Kootek GY-521 MPU-6050 MPU6050 Module 3 Axis analog gyro sensors+ 3 Axis Accelerometer Module My project will involve affixing this to a moving object, moving at velocities varying from 0.1 to 1.0 meters per second. From…
James Wierzba
  • 229
  • 1
  • 3
  • 9
8
votes
4 answers

Protecting your computer from stupid (arduino) mistakes

I recently ran way to much voltage through my Arduino and back into my computer via the USB connection. I'm looking for a USB hub with a fuse or some sort of protection to protect my laptop from these types of mistakes. Any suggestions as to…
StevieD
  • 181
  • 1
  • 2
8
votes
2 answers

How to use a common anode 7-segment, 4-digit display?

Please take this question as an example to (my own) answer below. I've got an 7 segment, 4 digit LED display, but I don't have any idea on how to wire it. I don't understand the difference between common anode/cathode, and I don't have 2 pins per…
aaa
  • 2,695
  • 2
  • 24
  • 40
8
votes
1 answer

How to stop uno from running program when powered on?

Does anyone know how to prevent the Uno from running the last program when it's powered on? Many times I have changed hardware and wiring without clearing the program first. Then when I power it on to upload the new program it will run the old…
perigalacticon
  • 357
  • 3
  • 14
8
votes
2 answers

Why the need to use the volatile keyword on global variables when handling interrupts in Arduino?

I am familiar with the keyword Volatile being used to declare variables that are shared among multiple threads on a software application (basically on a multithreaded application). But why do I need to declare a variable as Volatile when running the…
T555