Go to advanced search

by bradix14
Fri Apr 10, 2015 2:48 am
Forum: Troubleshooting
Topic: Reading in Serial data from Arduino via USB
Replies: 8
Views: 9969

Re: Reading in Serial data from Arduino via USB

In case anyone else is ever looking for how to do this -- I got it working in a simple way. It needs some error checking and exception handling, but the functionality is there. The Arduino just Serial.print values separated by a tab (\t) and it ends with printing a new line \n. The \n tells the pyth...
by bradix14
Sun Apr 05, 2015 5:59 pm
Forum: Troubleshooting
Topic: Reading in Serial data from Arduino via USB
Replies: 8
Views: 9969

Re: Reading in Serial data from Arduino via USB

I can read data from the Arduino using "cat /dev/ttyUSB0"

I tried this simple script and it just hangs as well....

Code: Select all

import serial
ser = serial.Serial('/dev/ttyUSB0', 9600)
while True:
    print ser.readline()
by bradix14
Sun Apr 05, 2015 5:35 pm
Forum: Troubleshooting
Topic: Reading in Serial data from Arduino via USB
Replies: 8
Views: 9969

Re: Reading in Serial data from Arduino via USB

So, based on the code, does it appear to only be a connection problem between Arduino and Pi? Is everything else in order for reading the data or making a connection?

I'm using a chinese Arduino Nano 328. It appears as USB0 in the arduino IDE, but I'll try those other options.
by bradix14
Sat Apr 04, 2015 11:42 pm
Forum: Troubleshooting
Topic: Reading in Serial data from Arduino via USB
Replies: 8
Views: 9969

Re: Reading in Serial data from Arduino via USB

Hmmm... yeah, mine shows at /dev/ttyUSB0 in the Arduino IDE under COM Ports. I'm on a B+. Not sure if it's different or what you're using.
by bradix14
Sat Apr 04, 2015 11:06 pm
Forum: Troubleshooting
Topic: Reading in Serial data from Arduino via USB
Replies: 8
Views: 9969

Reading in Serial data from Arduino via USB

I'm trying to read in a series of sensor values from an arduino that is connected to my B+ via usb and store those values to a mysql database. Here is my current code: import serial import MySQLdb podID = 2 podLocation = "'roof'" node_1_location = "'chimney'" #establish connection to MySQL. dbConn =...
by bradix14
Mon Feb 16, 2015 5:15 pm
Forum: Troubleshooting
Topic: B+ and NRF24L01
Replies: 0
Views: 256

B+ and NRF24L01

I've read a bunch of posts on this topic, but as I haven't found something that works yet, I'm hoping to breathe some new life into it. Has anyone successfully set up their B+ with the NRF24L01 module? Is there a guide that works? Is there something that needs to be enabled or configured specific to...
by bradix14
Tue Feb 10, 2015 6:21 pm
Forum: Troubleshooting
Topic: [SOLVED] RPI2 + NRF24L01 SPI problem ?
Replies: 13
Views: 24445

Re: [SOLVED] RPI2 + NRF24L01 SPI problem ?

Am I correct in assuming that some or all of these fixes do not apply to the Pi B+ ?

I can't get the NRF working with the B+. Any tips? The Pi just doesn't see the hardware.
by bradix14
Tue Feb 10, 2015 6:47 am
Forum: Troubleshooting
Topic: Sensor Input not working through Voltage Divider
Replies: 10
Views: 1530

Re: Sensor Input not working through Voltage Divider

Thanks for all the feedback and responses! The only reason I'm using the 18 gauge is because it is preexisting behind the walls. Way overkill, I know... I ran and dug out some spare wire and hooked it all up. No problems with 3.3v! that's good. Just curious though, I see all over online of people us...
by bradix14
Tue Feb 10, 2015 4:42 am
Forum: Troubleshooting
Topic: Sensor Input not working through Voltage Divider
Replies: 10
Views: 1530

Re: Sensor Input not working through Voltage Divider

Ok, I'm happy to use the 3.3v if it'll work for the application.

We're running these DS18B20 sensors over about 20 feet of 18 gauge stranded wire. I was hoping to run 5v to factor for voltage drop, but would I be fine with 3.3v?
by bradix14
Tue Feb 10, 2015 3:50 am
Forum: Troubleshooting
Topic: Sensor Input not working through Voltage Divider
Replies: 10
Views: 1530

Sensor Input not working through Voltage Divider

I've scoured the forums reading pretty much anything about voltage dividers, but haven't found a solution. I'm running my DS18B20 temp sensor at 5v for project application reasons. I've tried multiple voltage dividers of different values that give me 3v-3.4v. The sensors work fine running at 3.3v wi...
by bradix14
Mon Feb 09, 2015 11:16 pm
Forum: HATs and other add-ons
Topic: How to sense a 5v input with GPIO
Replies: 18
Views: 53052

Re: How to sense a 5v input with GPIO

Hi all, I have a question in line with this one. I want to use a 5V PIR sensor on a GPIO pin... so the output of the PIR is a 5V pulse. I tried connecting a 10k resistor in line with the output and connect this to the GPIO. This works, but I feel it is not the safest way to deliver this input to th...
by bradix14
Mon Feb 09, 2015 9:36 pm
Forum: Troubleshooting
Topic: GPIO not working - no response
Replies: 4
Views: 938

Re: GPIO not working - no response

Thanks!!! Got the sensors working. I'm going to read up on Device Tree.

The code in the post just added a line in the config for GPIO4. Will I need to do this for all pins? Enable them individually for each thing I want to do?
by bradix14
Mon Feb 09, 2015 7:39 am
Forum: Troubleshooting
Topic: GPIO not working - no response
Replies: 4
Views: 938

GPIO not working - no response

Just upgraded from Model B rev.2 to the B+. Is there something I have to do to turn on GPIO capabilities? I've hooked up some sensors that work fine on the model B, but it's like the B+ doesn't even know they're there. I've got the common DS18B20 temp sensor hooked up to 3.3v, GND, and GPIO4. I do t...

Go to advanced search