Most Popular
1500 questions
4
votes
1 answer
Bad readings from 12V pwm fan tachometer signal
I have the following circuit:
(The Arduino is powered via the USB)
The problem is that I the reading from the fan's tachometer signal are incorrect,
I tried to add the two resistors as voltage dividers but still the readings are wrong.
When I check…
Takata
- 71
- 3
4
votes
2 answers
Arduino resets or stuck during run, only when DC motors are connected
I'm using an arduino connected to 2 DC motors through L298N. the arduino is powered by a 9V battery, and the L298N is powered by 4 AA batteries. there's also a switch that starts the movement.
I've added print statements to debug, one in the setup,…
young marx
- 151
- 3
4
votes
2 answers
STM32 "black pill" won't enter DFU mode reliably
I'm following the standard process to put an STM32 "black pill" (STM32F401CC) into DFU mode so that I can upload from the Arduino IDE over USB:
Hold down boot0.
Press and release rst.
Release boot0.
When the board is not in a circuit this works…
NeilenMarais
- 209
- 1
- 7
4
votes
1 answer
I²C between ATTiny85 (8MHz) and Arduino Uno
I keep receiving the following error in myATTiny85-Slave code below:
sketch_mar12a.ino: In function 'void setup()':
sketch_mar12a:19: error: 'class USI_TWI_S' has no member named 'onRequest'
I have downloaded TinyWireS and TinyWireS.h clearly has…
lucidgold
- 233
- 1
- 3
- 9
4
votes
2 answers
Why is the constrain function used after the map function?
I am reading some sample code and they use this method of mapping data from IR sensors:
sensor1 = analogRead(0);
adj_1 = map(sensor1, s1_min, s1_max, 0, 255);
adj_1 = constrain(adj_1, 0, 255);
What is the point of using constrain here if…
Michael Rader
- 326
- 2
- 5
- 17
4
votes
2 answers
How to cut down size of imported DigiKeyboard library
I'm working on a project with a Digispark ATTiny85, that performs keystrokes using the DigisparkKeyboard library (https://github.com/digistump/DigisparkArduinoIntegration/tree/master/libraries/DigisparkKeyboard). Besides the DigiKeyboard, I also…
emma.makes
- 105
- 5
4
votes
1 answer
How do I escape a boot loop?
Note: This is a reference question (but feel free to write answers of your own!)
I uploaded code that contains a bug that causes my Arduino to immediately reset itself when starting using this code from the AVR libc FAQ. The built-in LED keeps…
glibg10b
- 317
- 1
- 7
4
votes
1 answer
ISR for very fast processes, strange code found. Has ISR effect on timer behaviour?
I found the following code within an example for performing very fast changes on a PWM-output. It works, however I'm wondering about some details.
TIMER2 was set up in setup() as follows:
TCCR2A = 0; // We need no options in control…
Ariser
- 577
- 1
- 7
- 25
4
votes
1 answer
Can not burn arduino pro mini 8 MHz bootloader with usbasp
I am using schematic of Arduino Pro mini 3.3v/8 MHz version. Please see below circuit diagram I built.
Power supply to circuit is 3.3V.
I have a USB ASP programmer which I used in previous version of same circuit running at 5V/16MHz. It was working…
adeel asif
- 61
- 2
4
votes
2 answers
How to program ATTiny85 running 3.3V
I have a working project built around ATTiny85 on a breadboard running at 5V. Now I want to move this prototype on a PCB where it will be powered from batteries. All components used are capable of running 3.3V so I want to run the ATTiny85 at 3.3V…
jnovacho
- 235
- 1
- 3
- 7
4
votes
1 answer
Ubuntu Serial Port Briefly showing on arduino IDE
I am using a NodeMcu with Arduino IDE on Ubuntu.
I have managed to upload the blink script and it work.
Now, when i plug the nodemcu, the serial port /dev/ttyUSB0 is briefly available in the IDE.
After 2 seconds, the port menu is grayed out again…
Justin Mayer
- 43
- 4
4
votes
2 answers
My ESP32-S3 DevkitC-1 has two USB micro ports labeled 'USB' and 'UART'. What are they for?
I'm new to micro-controllers. I've got an ESP32-S3-DevKitC-1 and I'm trying to do a simple hello world with the Serial. I'm using the Arduino IDE for flashing and serial monitoring. My code is:
/**
* As simple as it gets, right? Setup the Serial,…
Spina
- 139
- 1
- 4
4
votes
2 answers
I2C sensors not working when I connect to LCD 20X04
I am making a hydroponic nutrient monitoring system using Arduino Uno, Atlas Scientific EC sensor, pH sensor, and RTD (temperature) sensor in I2C mode. I also want to use LCD 20x04 to display the sensor reading so that will display the EC, pH, and…
Angela Radityatama
- 61
- 5
4
votes
2 answers
Does Nano not get sufficient power via USB?
I have an Uno, and I can play all I want with it, just using a USB cable.
Then I got two Nano clones, and they both show the same behavior:
When I connect it to the USB cable (which leads to my PC) it blinks a few times, then seemingly does…
Mads Skjern
- 1,125
- 3
- 13
- 23
4
votes
1 answer
ESP32 Wifi not working when powered by battery
I'm quite new to ESP32 development. I've been using this devkit for a few small projects and everything was going smoothly until I decided to run it on battery. In particular, the ESP32 devkit I'm using, when connected to a battery, seems to have…
luigi
- 63
- 7