Most Popular

1500 questions
4
votes
4 answers

class enum was not declared in this scope

I am programming an Arduino. In the same .ino file as setup() and loop() I have defined the following: void setup() { // setup code } enum class CYCLE { TypeA, TypeB }; String cycleToString (CYCLE cycle) { if (cycle == CYCLE::TypeA) { …
AJP
  • 181
  • 2
  • 9
4
votes
1 answer

Can I use an AC signal to make an LED light up with arduino?

I want to use a 220VAC load as a signal and act as a switch to my arduino so Labview could interpret it as an LED ON state. I used a 4n33 octocoupler but it seems that the LED Simulation on labview keeps fluctuating. I think it's because of the…
4
votes
1 answer

Can I program a factory fresh Atmega328P through UART pins without burning a bootloader?

Can I program a factory fresh ATMega328P using the UART pins without burning a bootloader? These pins are TX, RX, VCC, GND, and DTR pins in the schematic below. They are not the ISP/SPI pins 10-13. Arduino Pro Mini schematic For example, if you…
Bort
  • 151
  • 5
4
votes
1 answer

Have I fried my A2 port?

I'm playing around with a SparkFun Redboard (essentially, an Arduino UNO). I have a simple 5V sensor that I'd been trying to get to work with A2 and analogRead(). Nothing seemed to work. It's supposed to be cycling from 0 to 5V, which should give me…
Jeff Dege
  • 161
  • 3
4
votes
3 answers

Is there any limitation with Arduino Nano serial communication distance?

I am trying to build Project which communicate multiple Arduino Nanos. I wanted to understand if Arudino Nano is capable of doing that, while doing research I came across post where it says communication with nano can be done up to 2-3 meter, where…
Akshay
  • 193
  • 2
  • 9
4
votes
3 answers

Using an external header file

I have a project that is part of a larger repository, and shares header files with non-Arduino C programs. I know that it's possible to use these headers by copying them to the libraries folder, or the sketch folder, but I would rather use them with…
Photon
  • 163
  • 2
  • 6
4
votes
3 answers

Esp8266 Vin pin

I've read that Vin pin is directly connected to usb cable in esp8266 (which is 5V). I wonder if I can power a relay 5V and a servo motor Sg90 with this pin? And is there any danger of doing that ?
Radja
  • 53
  • 1
  • 1
  • 4
4
votes
1 answer

What does "Update of OCR1x at" mean in the WGM table of ATMEGA328?

I just finished a reading a couple of online guides on how to use timer registers with pulse width modulation, so I'm still new to its concept. When I looked in the ATMEGA328 specification sheet, I see this table: The column that I'm not…
learningtech
  • 173
  • 7
4
votes
2 answers

Why is AREF connected to a capacitor in the Arduino Pro Mini Schematic?

I'm currently looking at the Arduino Pro Mini schematic and have noticed that the pin AREF (analogue reference) is connected to a 0.1uF capacitor as shown below: I have done some research and read this great explanation into AREF and now understand…
4
votes
2 answers

Need little bit of help on testing I2C sketch

I have this code I got from YouTube for communicating between two Arduinos. By typing 'R' manually into the serial monitor of the 'master' Arduino, the 'slave' will print "Success". I'm trying all this for the basis of a project I'm starting. After…
Josh
  • 51
  • 2
4
votes
2 answers

Good quality sound using a microcontroller

I am a hobbyist. Doing some experiments with sound quality. I'll pin point my problem and requirements. Problem statement :I want to play audio files ( recorded in human voice, not music files, just some plain human speech files) I have tried : a…
muphy
  • 59
  • 2
  • 6
4
votes
3 answers

Memory usage: #define vs. static const for uint8_t

I'm writing an Arduino library to communicate with an I2C device, and I'm wondering what the best way is to declare all the register addresses so as to save memory. Using #defines: #define REGISTER_MOTOR_1_MODE 0x44 #define REGISTER_MOTOR_2_MODE…
4
votes
2 answers

How to converte EPOCH time into time and date on Arduino?

I have a question on how to convert EPOCH timestamps, which I receive as char*, into DD.MM.YYYY and HH:MM:SS format separately? Here is more information on my Arduino project: The Arduino is receiving through an ESP8266 module three different EPOCH…
imax10000
  • 43
  • 1
  • 1
  • 3
4
votes
5 answers

Simultaneous button reading?

I'm currently working on a project that requires that I simultanously check the state of two buttons. Each button HIGH state is assigned to one if loop. Here's the basic concept: void loop() { S1_State = digitalRead(S1_Pin); S2_State =…
4
votes
2 answers

Divide two integers resulting into a float

Suppose I want to divide two integer variables and put the result into a float. In order to prevent integer division do I have to program like this: int i = 6312; int j = 258; float f; f = i; f = i/j; Or can I straightforward…
PimV
  • 443
  • 1
  • 4
  • 12