Hot answers tagged

3

Serial has nothing to do with Wire/I2C communication. The examples only have this, because mostly they use Serial out- and input for interaction in the example codes (like showing the data of an I2C sensor on the Serial Monitor). If you don't want to use the Serial Montior/Serial communication, then you can leave all the calls to Serial out.


2

I agree with @Offer that using UART is the simplest solution to connect the devices. I just want to suggest two alternatives: Use an external analog to digital converter IC. Using the Arduino only for analog conversion is a bit over powered. E.g. the ADS1115 has a resolution of 16 bits and there's already a library, so usage should be easy. The ESP8266's ...


2

As I see it, the most straight-forward way to connect 2 Arduinos is using their built-in UART (aka Serial port, TX/RX pins) communication. There are many tutorials on this on Google, and a similar explanation can be found in this question: Serial communication arduino mega and D1 Wemos Mini However, there is a slight difference. Arduino Mega has built in ...


2

In the Nano Every schematic, PF2 and PF3 are connected over to PA2 and PA3 respectively. That is, Arduino pin A5 and ATMega4809 pins PF03 and PA03 are connected together by PCB traces such that there's no distinction between them, PF03 doesn't have its own header pin anywhere distinct from PA03. They're both A5. Likewise for Arduino pin A4 and ATMega4809 ...


2

This video might help you, in this video, an Indian guy explained the issue in detail with the help of the max30100 sensor schematic diagram, and solved it in two ways. https://youtu.be/ZqdmA4NAqb0


2

Sorry if I'm late to the party. I solved this years ago. Here's my YT video demo with a google drive link to the code in the video description. It works with the entire SM58XX series of sensors. Just input the parameters for your particular model in the top lines of the code and you'll be off to the races. https://www.youtube.com/watch?v=Xb2J1puSOwk


2

Reading and writing of serial data are separate functions. When you .write() you just append the data to the TX buffer. When you .read() you just take the next character from the RX buffer. All actual sending and receiving, and filling/emptying of the buffers is done inside the ISRs for the UART module. That said, you really shouldn't use Serial inside an ...


1

Generally you should not provide power to any pin of a device, which is powered off. That can cause current flowing through clamping diodes to ground and might destroy the pins hardware or the device (also it can lead to weird situations, where the device is somewhat powered through the IO pin, which might lead to instability). You can either cut the ...


1

Thank you for the answers, however, I am still confused as some sample codes included in the Arduino IDE do not have wire.setClock(), how can it work for I2C communication. for example: I2C SRF10 or SRF08 Devantech Ultrasonic Ranger Finder #include <Wire.h> void setup() { Wire.begin(); // join i2c bus (address optional for master) Serial....


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