So what exactly I am trying to do is control a motor and be able to turn it both ways without any extra parts.
So if the hmp was on (the plus pole) and the hmm (the minus pole) acted like ground the motor should start turning right.
But if the hmp…
I need to define a pin as output for relay module but when i do it in setup section, relay is activated (low - 0) automatically then i deactivated immediately with coding digitalWrite(pin, 1) but this issue results the relay is activated then…
I've got a LattePanda 3 Delta, which runs windows on its main processor and an Arduino sketch called StandardFirmata on its coprocessor. It's connected to a lock, which locks at HIGH and unlocks at LOW.
When I boot/reboot the LattePanda, there is a…
I am trying to use an esp32 (NodeMCU-32s) as a ringlight controller for my camera. All it should do is sense when an input pin goes low (the camera's output connects to ground when the shutter goes off) which is easy to detect with a simple…
so i recently got an arduino micro for a project needing the control of two stepper motors with the A4988 driver. previously i was prototyping on an arduino uno and everything was working fine, but on the switch to the micro the motors started…
I connected a wave generator to the analog pins to read the frequencies of the waves generated. I used different frequencies of sine waves with a minimum of 0V and maximum of 5V.
Whenever the voltage is greater than 2.5V, I made one of the digital…
So, I have this code (Arduino Mega):
void setup()
{
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(6, OUTPUT);
analogWrite(10, 50);
analogWrite(11, 50);
}
very basic motor speed control. Now when I do this (nothing else is connected…
I am using a device with an ESP 8266 microcontroller. I have discovered that setting LED_BUILTIN to HIGH turns the built-in LED off and setting LED_BUILTIN to LOW turns the built-in LED on. This seems to be because the microcontroller can sink more…
On an ATmega2560, can ports have some pins used for analog inputs but others as digtial i/o? Specifically, I only need to use 3-5 analog inputs but have many digital inputs. I would like to use the remaining 3-5 pins as digital outputs if…
Yesterday I played with a SRAM 621024 SRAM 1 Mbit IC and since I use a lot of pins, digitalReads and digitalWrites are needed including shift registers (see Example
Since it took a long time for reading/writing one byte, I checked for faster ways…
I have a device programmable via an 8 bit digital parallel bus. I would like an Arduino to translate from a parallel 4 bit output of an existing device to 8 bit by intentionally reducing the resuloution. Unfortunately, I can't just use the most…
Consider this code:
void loop() {
digitalWrite(pinTest, HIGH);
digitalWrite(pinTest, LOW);
}
On an Arduino Mega 2560, running 16MHz (=0.06us), I would expect the width of the pulse to be somewhere around 0.1us.
However, when measuring with…
Basically, my circuit contains only 1 resistor(like the basic LED circuit).
I tried to know what is the actual voltage of digitalWrite(High). I don't understand why the value of analogRead does not fix to 1023 but instead decreases when I decrease…
I have trouble with my laser sensor it doesn't work properly. When I connect all pins its doesn't work, when I remove GND and connect just the signal pin and VCC it works but the laser light is dim(I saw the light when I look at the sensor carefully…