Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
5

Without a common reference (ground) between the Arduino power supply and the external power-supply, again, you have a floating base, as you can't know what the Arduino's 5v output (or local ground) looks like to the external circuit. Connect the two grounds. That should correct the LED brightness with respect to the Arduino output pin level. Then, if you ...


3

The size of the text file and the size of your compiled code are impossible to relate. The compiled size purely depends on what your code consists of, not the size. To find out how much room your code will take on the chip you need to compile it. The IDE will then tell you how much flash and RAM it takes. For example: Sketch uses 3730 bytes (13%) of ...


3

You can create a class derived from Print that forwards its output to either or both Serial and Serial1. The only method you need to implement for this to work is write(uint8_t): class DualPrint : public Print { public: DualPrint() : use_Serial(false), use_Serial1(false) {} virtual size_t write(uint8_t c) { if (use_Serial) Serial.write(c); ...


2

There are no built-in level shifters on the Uno; it doesn't need them. Uno's 3.3v pin is merely a convenience for supplying a low-current 3.3v device but there is no provision made for level shifting if/when that is necessary. Genuine Uno's can deliver a max of 150mA to the 3.3v pin, so plan your current-budget conservatively. In my dual-voltage designs (2 ...


2

The Arduno UNO SMD R2 uses an MCP33269 not an LM1117. What you have is probably some cheap Chinese clone of the Arduino, and in that case the regulator will be the cheapest Chinese copy of the LM1117 available. It's impossible to tell what the specs of that specific chip are. Suffice it to say, though, that the specs of the chip are pretty much irrelevant ...


2

The Vref potential should not be 24V. As mentionned in the datasheet: Vref = 0.3V to 1.95V depending on what you want.


2

Just a math exercise really. Say you had a 5V source, two Resistors R1 and R2, and an Arduino. 5V - R1 - R2 - Gnd, with R1/R2 junction feeding the Arduino. R1 is unknown. Vout is what the Arduino sees. Vout = 5VxR2/(R1+R2) Vout (R1+R2) = 5VxR2 R1+R2 = 5VxR2/Vout R1 = 5VxR2/Vout - R2 Vout = ~ 0.00488mV x Analog In reading. (5V/1024) If you select R2 of say ...


1

Lets start off with a flow chart: simulate this circuit – Schematic created using CircuitLab To implement this I suggest you combine the Button example with the Blink Without Delay example. For this program you don't want to blink but instead turn the LED on for a set time without using the delay() function. If you are finding the task too hard ...


1

The find method reads the characters until the searched string is found or a timeout interval is passed. In your case if the connection is not successful, the first find will not find "WIFI" and will read all the input including the "+CWJAP:3", then on timeout it returns false. The second find will wait until timeout and then return false.


1

While CrossRoads' answer got the math sorted out that is likely not the kind of measurement you are aiming for if the unknown resistor has a rather low resistance (i.e. is just a piece of metal). Assume the same circuit: 5V - R1 - R2 - GND. Consider R1 to be a strand of copper wire of ribbon cable, AWG 26, i.e. with a diameter of 0.4 mm (0.016 inch) and a ...


1

The problem lies here: if (bluetoothByte == 1) { dithang(); else if (bluetoothByte == 0) dunglai(); else if (bluetoothByte == 2) lui(); else if(bluetoothByte == 3) quaytrai(); else if (bluetoothByte == 4) quayphai(); else if (bluetoothByte == 5) batcoi(); else if (bluetoothByte == 6) batden(); } You open the first if statement with a bracket {. This ...


1

in setup you are calling pinMode(b, INPUT); pinMode(up, INPUT); pinMode(down, INPUT); but b, up and down all equal 0 so this is what you are doing is : pinMode(0, INPUT) pinMode(0, INPUT) pinMode(0, INPUT) This doesn't do what you want at all, these need to be assigned to pins. All you are doing is repeatedly setting arduino digital pin 0 to INPUT 3 ...


1

Pin definitions in your code seem to be mixed up. If Adafruit example works fine with your setup, you should keep the pin definitions Adarfruit uses: #define OLED_MOSI 9 #define OLED_CLK 10 #define OLED_DC 11 #define OLED_CS 12 #define OLED_RESET 13 Also, you are using a deprecated constructor. It is recommended to use a constructor which ...


1

From my experience the esp8266's wifi is a little bit buggy sometimes. I'm not sure if it has something to do with the esp auto-connecting to known networks, but I managed to work-around this issue by explicitly WiFi.disconnect()ing from any potential network right before calling WiFi.begin(). Another thing that I noticed several times is that the esp can ...


1

Pins of the UNO/Nano/Mini/Mega board are connected to GPIO pins of the MCU without any additional circuit. The ATmega MCU running at 5 V will sense 3.3 V as HIGH because of the threshold level to convert voltage to logic state. ATmega will read the pin HIGH from 0.6 * Vcc, so AT 5 V Vcc the threshold is 3 V. Sources: Schematics of Arduino Uno Datasheet of ...


1

As Wendall says in his comment, you probably have an issue with the power-on state of your logic pins before the Arduino finishes booting up. In addition to that, you should not drive a relay directly from an Arduino logic pin, for a couple of reasons: It can't provide enough current to drive a relay coil. The relay emits a strong surge of reverse current ...


Only top voted, non community-wiki answers of a minimum length are eligible