hcheung
  • Member for 4 years, 1 month
  • Last seen this week
Serial communication with 2 Arduinos and one optocoupler
0 votes

Here is a diagram that I would suggest you to to try it out. The transmitting Arduino pin will turn the internal infrared LED on or off depend on the whether the pin is at LOW or HIGH. When the ...

View answer
Arduino Nano: Send a few bytes over Serial with as little delay as possible
3 votes

"Slowing down to speed up". - a Chinese proverb The problem is with your python code. Not sure what your computer's operating system is, but if you are using Mac or Linux, if you run top ...

View answer
Wifi Scanning code for esp32 wroom 32
0 votes

You are not doing it correctly. In order to perform WiFi scan: It must be in WIFI_STA mode; It has to be disconnect from the AP; After you done with the scanned SSID, BSSID and RSSI, you need to ...

View answer
Arduino Blink two LEDs without Delay(amount of repetitions)
-1 votes

I'd like to proposes a couple of changes to @VE7JRO's implementation. For C++, it is perfectly normal to initialise an Class instance via its construct, however, for Arduino, the setup() get call in ...

View answer
Where are source files for Due?
2 votes

The Arduino Core for supporting Arduino Due is called ArduinoCore-Sam, which can be found at https://github.com/arduino/ArduinoCore-sam, inside the system directory, you will find the CMSIS device ...

View answer
SPI synchronization with Arduino DUE and ADIS16364 IMU
3 votes

First of all, this may not related to your question, but you are using old SPI methods setClockDivider(), setDataMode(), and setBitOrder() that has been deprecated since 2014. It is recommend to use ...

View answer
How esp8266 gets response from server..?
1 votes

SoftwareSerial does not works well for baud rate higher than 9600bps, you need to change your Arduino and ESP8266 to operate at 9600bps. Use the AT+UART_DEF=9600,8,1,0,0 to set the ESP8266 to ...

View answer
Customizing system settings with defines?
1 votes

I have heard that there's a way to set or reset the define statement inside the .ino file to customize this setting for some libraries, but I don't know how to do this myself There are many ways to ...

View answer
connecting a small motor to arduino using a transistor
3 votes

I like your thought process (even though it might not be completely correct), I've seen how little thought were put in for such simple circuit design in the Arduino community, including from some ...

View answer
Where is all of the Arduino Documentation?
5 votes

I'd like to add to what JRobert said of finding the information the "hard way"(i.e. looking into the datasheet of the chip it used, and understand how it works from schematic). In the ...

View answer
Sending multiple data with SPI interface monitored by an Osciloscope
0 votes

SPI.transfer(&test[i],4); The SPI.transfer() transmit one byte each time and therefore expecting a pointer to a byte (i.e. uint8_t) while you are passing in an address of an uint32_t. What you ...

View answer
Rounding to the next upper (or lower) 0.1
1 votes

I often store the floating point data that I get from a sensor in integer to preserve the decimal precision that I want by multiple it by 10 before casting it into an integer. It is easier and more ...

View answer
strcmp doesn't seem to work
2 votes

The easier way to simply the code is to use strcpy to create a buffer that is 1 byte longer than the length and then terminate it with \0. void messageHandler(char *topic, byte *payload, unsigned int ...

View answer
How to read an analog value on ESP32-CAM with the SD card reader enabled?
Accepted answer
1 votes

According to the schematic and pin notes, I don't think you can use GPIO4 as an ADC input (it can be used as a GPIO pin and technically it can be configured as an ADC pin), but it has a 47k pull-up ...

View answer
arduino parking lot
Accepted answer
0 votes

You can connect multiple devices or modules to the same 5v pin, as long as it does not exceed the maximum current that the on-board 5v regulator can handled. If you are using a genuine Arduino Uno, it ...

View answer
When is SPI.beginTransaction required?
Accepted answer
3 votes

Although this question has an accepted answer, I'd like to provide some background and historical reasons to OP's question. Transactional SPI using SPI.beginTransaction() was introduced in 2014, it ...

View answer
esp32 voltage divider readings off
Accepted answer
1 votes

First, ESP32 ADC is 12-bit, not 10-bit. therefore the formula should be: float voltage = sensorValue * (3.3 / 4096.0); Secondly, ESP32 ADC is not really linear, and tend to have lower reading than ...

View answer
Using several Arduinos simultaneously
3 votes

Among all the options mentioned, using a master/slave should be the last resort, especially when you are new to embedded programming or Arduino, it is not only more complicate but also more expensive ...

View answer
Smallest microcontroller?
0 votes

I made a Arduino develop board with ATtiny3217, it has a 24-pin VQFN form factor, but as powerful as ATmega328p, with no external crystal and capable running at 20MHz. If this is not suitable for you, ...

View answer
Using LM70 temperature sensor with Arduino
2 votes

There are several things that are not doing correctly. This is not a complete answer but to provide you some directions on how to get it right. A0 is pin 54, it is not SS which is pin 53; On how to ...

View answer
Serial Monitor shows a continuous "word salad" without a loop
1 votes

The ESP8266WiFi.h is for running on an ESP8266 host, but your are trying to use it on an Arduino Uno. This caused the crash of your sketch on Arduino Uno. Based on the connection diagram you provided, ...

View answer
4-digit 7-segment display not showing value properly
2 votes

What caused the problem of the digit that driven by pin 12 is quite obvious to me. You use pin 11, 12, 13, 14 for driving the 7-segment digits. While SPI library by default uses pin 10, 11, 12, 13 as ...

View answer
Using different processors when it comes to arduino
Accepted answer
1 votes

For learning it really doesn't matter much of which MCU to choose from. For actually embedded project development, it really depends on what you want to do with your dev board. I thought that I would ...

View answer
Arduino ESP8266 GPS integration issue
Accepted answer
1 votes

As mentioned by StarCat and romkey, SoftwareSerial only allows one connection at a time. There are two potential solutions to this in my opinion, but each requires some new hardware. Solution 1 - ...

View answer
Arduino ESP8266 Wifi Shield GET request with LiteESP8266Client stops after few HTTP request
Accepted answer
2 votes

There is a bug on the library example webclient.ino on getHttpPacket() and getHttpResponse() that it didn't free the memory correctly, causing memory leak. I've updated the code on github repo. ...

View answer
Displayng 2 error messages on a 16x02 display
1 votes

According to MAX6675 datasheet page 5, it will set Bit 2 of SPI register to HIGH when the thermocouple is open. Adafruit's MAX6675 library however changed this to return a NAN when Bit 2 is set when ...

View answer
SPI Slave Programming for Arduino
2 votes

SPI.h library by default only support Master mode, the SPI.begin() will automatically set slave select (ss) pin to HIGH whether you have pinMode(ss, OUTPUT) in your setup() code or not and set the ...

View answer
How to pass a changing value to a graphic display using Arduino?
Accepted answer
0 votes

You didn't mentioned how you convert the floating point value Tc to a string before passing it to dog_7565R::string, but if you are using sprintf(), by default Arduino has the sprintf() support for ...

View answer
Serial printing from Flash Memory (F() macro, PROGMEM, sprintf_P, SPTR)
4 votes

First, the freeMemory() function that you used from Adafruit was originated from a github, I don't know about the __arm__ implementation, but for the avr, it is incomplete for handling the corner case ...

View answer
How to fix memory-leak code in ESP8266/NodeMCU caused by string concenation?
Accepted answer
2 votes

To write code that will not cause memory leak, you need to understand of where and what caused the memory leak first. The memory leak in this particular case is caused by the line serial_data_read....

View answer