Hot answers tagged

3

6 feet should be doable for I2C with decent cable, serial over USB (you can use a hub on RPI end for more ports) should also work. However, I recommend looking into network-enabled (MQTT and alike) communication; you could replace your arduino with things like ESP8266: it may take little learning to get going but they are cheap and the benefits of getting ...


2

Instead of a $50 Rubber Ducky you could get a $5 Arduino Beetle (a clone of Leonardo which fits directly into a USB socket): Look into Arduino Keyboard samples to see how it should be programmed. I have used one such board to send Ctrl+Alt+Del, password, Enter to log into a Windows PC. In your case, you'll be sending something like Ctrl+Alt+F1, sudo ...


2

A5 to A0 should be thought of as a binary number. Ax is 1 if there is a solder bridge, otherwise 0. A5 A4 A3 A2 A1 A0 Decimal 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 2 0 0 0 0 1 1 3 0 0 0 1 0 0 4 0 0 0 1 0 1 5 0 0 0 1 1 0 6 0 0 0 1 1 1 7 0 0 1 0 0 0 8 ... 1 1 0 1 0 1 53 1 1 0 1 1 0 ...


2

I appreciate that you've since circumnavigated the problem by implementing your own version of readStringUntil()/readBytesUntil() but, as @crasic and @evildemonic alluded to in the comments, I think the error message you are seeing is down to this part of your code: if (SerIn=='Got') { Serial.println('I got it'); }else{ Serial.println('Oopz'); } And ...


2

That is very much the premise of Ultibo. What is Ultibo? Imagine if you could have the simplicity and freedom of Arduino with the power and features of a Raspberry Pi. With the ease of a microcontroller and the flexibility of a real computer, Ultibo gives you a platform for creating anything without the limitations of a traditional operating ...


2

There are out-of-the-box solutions available for this. For instance joy-it.net has a solution with a HAT and a battery that can be used to power the Pi. It does cover the CPU though, but it should be possible to put a flat passive cooler on it and mount a fan at the edge of the board instead. That is, if it is required at all - the Pi doesn't necessarily ...


2

You may be able to build your Arduino code to run on a Raspberry Pi at https://create.arduino.cc/ but there are no guarantees. To read a serial device and do something with your data on a Raspberry Pi you're going to get more success with a simple python program #!/usr/bin/python import serial, string, time, sys output = " " ser = serial.Serial('/dev/...


2

You can monitor the Pi GPIO from an Arduino. Note that all the Pi GPIO are 3V3 and there are 28 of them on the 40-pin expansion header. You will need an Arduino with at least 28 GPIO if you want to monitor all the Pi GPIO simultaneously. Although a 5V Arduino will probably see a Pi logic high 3V3 as high it might be safest to use a 3V3 Arduino. Remember ...


1

TBH I do not think this is a Pi issue. The chip could have the wrong clock speed set in its internal fuses or have a different external oscillator crystal. You need to run the avrdude program from the command line using the -c and the -v options then look at the result using something like this fuse calculator. My guess is the device has the div by 8 bit ...


1

Given this is basically two IR LEDs and a LM393 comparator, I think your only hope is to select a supplier off Alibaba and work with them. Gut feel is you will get nowhere and would do better to build your own. I think you would do better to ask this on the electronics forum rather than the Pi one as it’s not specifically a Pi question. You can find the ...


1

I think the Python Socket module can do this https://docs.python.org/3.3/library/socket.html. Not many documented examples, maybe this socket client would be a good example to follow: http://blog.kevindoran.co/bluetooth-programming-with-python-3/ There is also a useful API in the Blue Dot library: https://bluedot.readthedocs.io/en/latest/btcommapi.html#...


1

The nature of the signals you want to send are not clear. I am going to assume you want to send a signal (without data) from the Arduino to the Pi. The simplest way to achieve this end is as follows. connect the Arduino and Pi grounds (i.e. connect a wire between an Arduino ground pin and a Pi ground pin). Connect an Arduino GPIO to a Pi GPIO. This is ...


1

As you have discovered the version in the repository is hopelessly outdated (and will NEVER be fixed, because of some Debian politics). You can safely purge the installation without losing any of your files. Just download the Linux ARM 32bits version from https://www.arduino.cc/en/Main/Software See https://arduino.stackexchange.com/a/44813/3879 for ...


1

It could be that you have software installed which tries to talk to the Arduino at the same time as the IDE. For instance, modemmanager is known to cause trouble. Run udevadm test $(udevadm info --query=path --name=/dev/ttyUSB0) (or whatever the name of your Arduino is) and check the output for any udev rules that are executed. You may see rules which ...


1

Question How can Rpi talk to Arduino in RF? / to continue, ... Answer For poor IoT hobbyists like me, I would suggest to start with: (1) BLE (2.4GHz), (2) NFC (13.56MHz), and (3) 5G (452.5 ~ 467.5MHz, 700MHz~ 2.2GHz) Above three are wild choices. For newbies, I would eliminate (1) BLE, because RPi4B buster BLE still have teething ...


1

The error message you are getting says 'int' object has no attribute 'encode', the encode method is only available for objects of type str. I believe you want the str() function instead to convert the integer into a string (or byte array) that the write function can then use. You also mention (in the comments) that the Arduino side is only receiving the ...


1

This fixed my issues with Raspberry Pi 3 B+ and Raspberry Pi 4 In lib_nrf24.py in function: def begin(self, csn_pin ... after self.spidev.openadd: self.spidev.max_speed_hz = 4000000 Did you find out an other solution?


1

sending datas to my raspberry pi3 from an arduino mega I'm presuming from the rest of the context this data is in text form, eg., if the value 1234 is part of the data, it is sent as a string of four characters, "1234". In case that's confusing, the alternative to this is sending data in binary form, eg., if 1234 is a 16-bit value as basic integers are on ...


1

Whatever you do yo must not connect things directly. Us a resistor between these power source connections. The Arduino will be ok. But the rpi will burn if anything goes wrong. Use the analog reading codes for both end to read the voltages.


1

First the diagram you listed will NOT WORK and risks damaging either or both devices. If you want to directly connect devices they MUST use a common reference. This is normally the 0V pin/s (often incorrectly labelled Gnd). It is "safe" to connect a 3.3V logic device to the Pi, and you could connect 3.3V power pins (although I would NOT do this). If you ...


1

The way I see it, no matter what, you will need to issue a poweroff at the raspberry after you do what ever you want to do. At this point you are left with a raspberry that needs either a plug/unplug of the usb cable or grounding pin 5 (or connect pins 5 and 6, 6 being the GND). So yes, you will need another "brain" that draws a few mA of power and will ...


1

You do not need to connect with Bluetoothctl. With Bluetoothctl, use exactly most commands as you show; then after pair, leave this window but not close. Open new terminal and use rfcomm bind rfcomm0 98:D3:31:FB:6F:F1 But note: there is still no connection at this stage. To make real connection, use something to connect to your new serial port, like ...


1

If you're really using an Arduino Micro as specified in the title, the accepted answer (which uses an Uno) won't work due to the Micro's lack of separate USB chip. Instead you'll want to Upload the SerialPassthrough example to your Micro. Connect Arduino GND to RPi GND Connect Arduino RX to RPi TX Connect Arduino TX to RPi RX using voltage divider Connect ...


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