Most Popular
1500 questions
4
votes
1 answer
Arduino uno PWM CTC mode - strange behaviour on interrupt
i have this simple code that i use for generating a square wave signal of 125 KHz on pin 9 using Timer1 in the "Clear Timer on Compare Match (CTC) Mode".
I also use Timer1 Compare Match A interrupt for toggling pin 7 of PORTD.
void setup()…
Anacleto
- 43
- 3
4
votes
3 answers
Rotary encoder on Uno and interrupts issue
This question is regarding a project using an Arduino Uno.
I have one of these quadrature rotary encoders.
I'm using a slightly modified version of the code from the article, Quadrature Encoder too Fast for Arduino (with Solution), which uses a…
pat333
- 41
- 3
4
votes
1 answer
Using signal strength feature of nRF24L01 module
This is a walkie-talkie project and this circuit really worked, voice can be transmitted from one nRF module to another nRF. Additionally, I want to observe how well the signal strength is, by lighting up an LED.
They talked about a test.RPD…
user175079
- 41
- 1
- 3
4
votes
2 answers
Sending serial data in an interrupt
An ATMEGA328-P chip is used with a toggle switch attached to pin 8 and a momentary switch attached to pin 9. My objective is to send the following information over serial:
The status of pin 8, every second.
Count the number of presses of pin 9,…
Greg
- 143
- 1
- 1
- 5
4
votes
3 answers
Controlling EL wire or panels with arduino
I understand that el wire and paper needs a special power source known as an inverter to light it up.
If I wanted to control it from an arduino, what point would I connect the arduino to the light or inverter?
Tom
- 165
- 1
- 5
4
votes
3 answers
can arduino on output mode sink current?
I have a arduino set below:
pinMode(1,OUTPUT);
digitalWrite(1,LOW);
Now, I am expecting 1.2mA current flow through the pin that is set as output. Is that accepted? If so, what it the max current a pin can sink?
The current comes from a pul up…
Ryan B.
- 103
- 1
- 6
4
votes
1 answer
How can configuration values be stored on an ESP8266?
I have a project that uses an MQTT service, and I'm wondering how to best store the configuration settings (server, user, password, port) for the service as right now they are just hard-coded into some constants.
I saw that EEPROM can be used for…
travis
- 201
- 1
- 2
- 8
4
votes
1 answer
Is it possible to sample sound with arduino?
I have the arduino duemilanove with atMega328.
The frequency is 16Mhz.
I want to sample and record from the audio jack.
I searched and i found if i want to record "everything - so to speak", i have to sample at 44100Hz.
That means this is unfeasible…
user1584421
- 1,425
- 3
- 26
- 36
4
votes
3 answers
Confused between SPI and I2C for SSD1306 OLED
I recently got myself an SSD1306 OLED display:
I haven't been able to successfully wire it to an Arduino (Mega 2560) however. I have been reading up on I2C and SPI and checked some libraries from Adafruit and U8G2.
However, I'm confused, since most…
Bart Van Loon
- 145
- 1
- 1
- 6
4
votes
1 answer
How does the microcontroller know which clock to use?
I had seen some tutorials on how to assemble an Arduino on a breadboard. They all just place the external crystal oscillator according to the circuit and then, just burn the bootloader and it starts working. According to my little knowledge the fuse…
Aneesh Sharma
4
votes
1 answer
Arduino continuously reading ADC value using interrupt
I have a mono jack audio act as analog input for arduino UNO. The microphone outputs voltage that varies in terms of amplitude (volume) and frequency. In order to get the high sampling rate, I use prescaler 16 and set high baudrate for serial…
SNahar
- 43
- 1
- 1
- 4
4
votes
3 answers
The exact time for functions or CPU cycles for any function
I'm trying to read input data from the parallel port of a PC and send it to another device. For this purpose the input data is saved, when it's available and is sent if a flag is set.
The whole procedure should be done in less than 10 ms. I need to…
Mehran
- 155
- 1
- 6
4
votes
3 answers
Error: 'SofwareSerial' does not name a type
I have trouble compiling this sketch. The error I get is
'SoftwareSerial' does not name a type
Any ideas how could I fix it?
#include SoftwareSerial.h
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and…
alkopop79
- 145
- 2
- 2
- 7
4
votes
4 answers
Importance of resistor
I'm new to Arduino and also new to electronics. I'm following the tutorial here. I'm not understanding the importance of the resistor in this schematic diagram. Can someone please help me on this?
Noor
- 143
- 5
4
votes
4 answers
Why does opening the Tools menu take so long?
Every time I open the Tools menu, the IDE freezes for a few seconds. Why is that? It happens on both of my computers, and nothing I do makes a difference in how long it takes. I've tried restarting the IDE, unplugging my Uno, and many other things,…
The Guy with The Hat
- 5,292
- 7
- 30
- 51