10

This answer provides both Arduino specific knowledge and general electrical knowledge - both are necessary for a good solution (unfortunately). Summary To carry out Arduino analog to analog transfer: Use analogWrite(pin, value) on a valid digital pin (see below) Use analogRead(pin) on a valid analog input pin. Connect a series resistor between the two ...


8

As far as simplicity is concerned, HC05 would be the way to go. It is by far the most popular and there are a tonne of tutorials on using it (just a quick google search). As for the differences: The HC-05 module can build a connection to other modules. E.g. a Robot being a master and connecting to slave bluetooth module. Or in slave mode to make a wireless ...


7

Yes. The serial port uses a ring buffer (also known as a circular buffer) for storing the incoming data until you want it. That buffer is 16 bytes in size on the smaller Arduinos and 64 bytes in size on the larger one. A similar ring buffer is used to store transmitted data until the port is ready to transmit it in the background.


7

/dev/ttyACM0 is a USB communication device (CDC) of sub-type "abstract control model" (ACM). That is what the Arduino is. /dev/ttyS0 is a hardware serial port - the (typically) 9-pin D connector on the back of your computer. If you want to use /dev/ttyS0 (why would you?!) you will require a special cable that converts the RS-232 voltage signals from the 9-...


7

Important information: Wire.write() does NOT send anything over the I2C lines. It just puts the data into the libraries internal buffer. The actual transmission is then done by Wire.endTransmission(). I2C is packaged transmission protocol. That means, that the transmission is done in confined data packages. In your master code you are calling Wire.write() ...


6

The Arduno 101 doesn't communicate to the PC using a UART. It uses CDC/ACM over USB, which looks like a UART to the PC. But it isn't. USB sends packets of data, not individual characters It only sends if there is something to receive it at the other end There is no such thing as baud rate with USB. Basically, when the CDC/ACM port has been opened by an ...


5

There is no simple way to combine multiple boards into a unified system. What you will need to do is delegate certain tasks to each board and then have them communicate via SPI, I2C, or UART between a master board and each slave board in the system. The master system will then present the interface of the system as a whole via serial, wifi, console, etc.


5

How would the wiring look like? I was unable to find any dumb-proof tutorial online. I found this tutorial to be pretty usefull. There really isn't much to it, I suggest trying a short range before going full range. It's a "half duplex bus system" the ends of the bus should have a "end termination resistor", usually 120Ohms, between the A and B signal. ...


5

This is the kind of situation where printf() comes handy: printf("%03d", number); prints the number in the format you described. Alas, printf() is not part of the standard Arduino API. But you can have it, nonetheless, at least on AVR-based Arduinos, as it is provided by the avr-libc, which is always linked with all Arduino programs. Some setup is needed ...


5

There is a ready out the box solution documented in https://github.com/MichaelJonker/HardwareSerialRS485/wiki (This wiki describes the library you referred to). The problem is quite complex: collision avoidance, collision detection and message retrial, message priority and message filtering. But the library solves it all. The software even provides a ...


5

Since you are Arduino Uno, it has only one Serial. This Serial can be used to transmit data in USART mode to another Serial Device as well as see any Debug data in the Serial terminal. However, both the functionality can not be used simultaneously. The Tx Rx pair of Arduino can be connected to one pair of other device i.e. either to the computer via the ...


5

It seems I needed to add a parser to SerialPort nodejs module, in order to specify how the input should be treated. I changed my code to this: var SerialPort = require('serialport') var Readline = SerialPort.parsers.Readline var serialPort = new SerialPort('/dev/ttyACM0', { baudrate: 9600 }) var parser = new Readline() serialPort.pipe(parser) parser....


5

You should be pretty safe, at least as long as your code handles the incoming data properly. When you upload a new sketch through USB, the USB-to-serial interface uses the Arduino pins TX0, RX0 and RESET. Your Ethernet shield, on the other hand, does not control the RESET pin. Pulling the RESET pin LOW is needed to make the processor enter the bootloader, ...


5

The SAMD boards connect to computer over native USB support of the MCU. The handling of the USB is done by Arduino core functions linked at build to your sketch. A consequence of using the native USB port is, if your sketch has a problem, it influences the USB communication. In this case you can activate the bootloader to handle the USB port and the upload. ...


5

You can have bidirectional communication over a single wire by using open-collector outputs. For this, you could add a circuit like this on each side of the link: simulate this circuit – Schematic created using CircuitLab Here, TX is the transmit pin of the Arduino, and DATA is the data wire. The RX pin is connected directly to the data wire and, ...


4

You cannot do this with the micro USB ports. You will need to use I/O pins. Either serial or I2C would be good options. It might be advisable to use I2C if you want to control multiple 'slave' microcontrollers as they can all sit on the same bus. Using the serial port would require multiple transmit and receive pins on the master controller, likely ...


4

Might be a little late, but you can string more than two of these on one I2C bus, with a little ingenuity. You connect the AD0 pin of each MPU to a different I/O pin of the processor, then take low the address of the one MPU you want to talk to. Then that MPU has one address, all the others have the other address, and being slaves will not respond. ...


4

You can chain as many shift registers as you want. Most commonly, these displays are multiplexed. Only one digit is lit at a time, cycling though all the digits fast enough, so the eye can't tell. This is however not very good practice for 28 digits, as the brightness will become 1/28th (though you could create groups of digits, and multiplex those groups ...


4

MQTT Library for SIM800 GSM Modem is available at ElementzTechBlog, ElementzGithubRepository Functionalities: Auto connect Automatically connect to TCP and to MQTT server. connect function This function can be used to connect your client to MQTT broker. Use only if you do not use Auto connect functionality. Optionally you can use username, ...


4

You could have the LCD Arduino be an I2C master and all the weighing Arduinos be slaves. There's an example of master/slave communication and wiring here: https://www.arduino.cc/en/Tutorial/MasterReader. I2C supports up to 128 devices and the wiring is very simple.


4

There are three basic factors that control long distance communication: Transmitter Power Receiver Sensitivity Signal Directionality The more transmission power you have the "louder" your signal is at the receiver. The more sensitive your receiver the "quieter" the signals it can pick up. The more directional (focussed) your signal is the more arrives at ...


4

I realize this is an ancient question, but just in case someone else has one of these things, I'll share what I know. I have one of these Sharp LCDs that I typically use as a monitor for a Commodore 64. I believe mine was originally from a rear seat DVD player in a Ford Explorer. Looking at the rear of the unit, with the two connectors on the bottom, the ...


4

Regarding the hardware problem, there are some advices in the comments. As you wrote, the solution is to reduce the bitrate at 2000 bps. The remaining question is why the receiver always truncates the message (after a receiving error occurs). The answer is in the definition of the buflen parameter of the vw_get_message function. The page https://www.pjrc....


4

Going over USB will add about a millisecond of jitter to your data in both the sensing and command directions. Using a part with direct USB rather than then needing to go through a serial link from USB chip to processor could help limit what is added on top of that, but it will still be there. If you could get a USB high speed solution that would reduce ...


4

Have you tried setting the web editor's baud rate to both the old and the new values? I ask because the CIOBAUD command has been obsolete for a while now so, depending on the age of your device, it may have done nothing. The command was replaced by "AT+UART_CUR" and "AT+UART_DEF" which have a different syntax. See this answer to a similar question. Update: ...


4

If serial data is coming in, and your code is doing a delay, the incoming data is stored in a buffer (of 64 bytes). But if you wait too long, the buffer will fill-up. Once it's full, any further incoming serial data isn't stored, and will be lost. In your third output example, you get exactly 63 characters. Which is the maximum size a 64-byte cyclic buffer ...


4

There are a few issues at play here. One is that the Arduino resets every time you open the serial connection on the PC side. You can prevent this by putting a 1 µF (or more) capacitor between 5V and RESET. A second issue is that the tty driver may be keeping old data in its buffer, and you get this data when you open the connection. The third issue is that ...


3

If your aim is to send a constant value from Arduino A to Arduino B, then a really easy way is to use SoftwareSerial. Let's say you are using Arduino Uno - you can use pins 2 and 3 for SoftwareSerial (see which pins are supported for which device at http://arduino.cc/en/Reference/SoftwareSerial) Cross connect pin 2 and 3 from Arduino A to pin 3 and 2 of ...


3

analogWrite() on the Uno doesn't actually output an analog value. It outputs a PWM wave whose average is equivalent to that value. If you want to turn it into a true analog value then you need to put it through a low-pass filter in order to remove the components that make it a PWM wave instead.


3

The "best" software for me is the free Visual Studio Express for Desktops. Using C#, I would add a SerialPort component to the form, configure it for the same COM port as the Arduino/FTDI, then send commands to it. Visual Studio is "stupid simple" (I'm not implying anything :D). Double-click Button in the toolbox(1) and it creates one. Double click the ...


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