Go to advanced search

by Mvlawn
Sat Apr 18, 2015 2:30 pm
Forum: Python
Topic: Loop keeps populating old data
Replies: 1
Views: 420

Loop keeps populating old data

I posed this question on Reddit but i got no response. I have a python script that gets data via serial RS232 and prints it out. This code works very well, updating at a rapid pace. import serial port = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=3.0) def filewrite(rcv): logfile = open("tem...
by Mvlawn
Fri Apr 17, 2015 12:38 pm
Forum: Python
Topic: NameError: name 'port' is not defined
Replies: 2
Views: 1971

Re: NameError: name 'port' is not defined

I left out

Code: Select all

port = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=3.0)
That's why it didn't work. Thanks for the reply you made me study the script a little harder.
by Mvlawn
Fri Apr 17, 2015 11:58 am
Forum: Python
Topic: NameError: name 'port' is not defined
Replies: 2
Views: 1971

NameError: name 'port' is not defined

Hello all. I have a script that when i read my /dev/USB0 it will print out the data and does so with out fail import serial port = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=3.0) def filewrite(rcv): logfile = open("templog.txt", "a") logfile.write(rcv) Logfile.close while True: rcv = port....
by Mvlawn
Tue Apr 14, 2015 3:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need some Serial advice
Replies: 2
Views: 502

Need some Serial advice

I am currently working on a Beehive monitor and would like to record the weight twice per day. The scale i purchased is a CPWplus 200 Bench Scale with a 9 pin D-sub on it for RS232. What is the best way to hook this up to my RPi? I don't believe speed will be an issue but i am not sure. I don't mind...
by Mvlawn
Sat Apr 11, 2015 3:32 pm
Forum: General programming discussion
Topic: Converting from C to F
Replies: 2
Views: 1456

Re: Converting from C to F

Thanks ame. I added the statement below and it appears to work now.

Code: Select all

   if outhumidity is None or outtemp is None:
      time.sleep(2)
      continue
by Mvlawn
Sat Apr 11, 2015 1:34 pm
Forum: General programming discussion
Topic: Converting from C to F
Replies: 2
Views: 1456

Converting from C to F

Hello All. I am trying to add a second DHT22 to my script. When i run it, it works fine, logging the temps in Google Sheets. I added some math to convert it over to deg F and I get a TypeError: unsupported operand type(s) for *; 'NoneType" and 'float' What am I doing wrong? Line 118 is where i am tr...
by Mvlawn
Tue Apr 07, 2015 9:10 pm
Forum: General programming discussion
Topic: Combining 2 tutorials
Replies: 6
Views: 1407

Re: Combining 2 tutorials

JF002

Thank You that worked.
by Mvlawn
Tue Apr 07, 2015 7:49 pm
Forum: General programming discussion
Topic: Combining 2 tutorials
Replies: 6
Views: 1407

Re: Combining 2 tutorials

JF002 your comments worked. I had to move the print temp to line 112 for it to work in the loop. Thanks so much!!! I appreciate your time as that was no quick 2 sentence response. I assume I have to rename the Temp Line113 to something else so that id = '28-00000657a569' print "Temp : " + '{:.3f}'.f...
by Mvlawn
Tue Apr 07, 2015 6:05 pm
Forum: General programming discussion
Topic: Combining 2 tutorials
Replies: 6
Views: 1407

Re: Combining 2 tutorials

I forgot to add the screen shot. [img]file:///home/pi/Desktop/2015-04-07-135221_1776x952_scrot.png
[/img]
by Mvlawn
Tue Apr 07, 2015 5:58 pm
Forum: General programming discussion
Topic: Combining 2 tutorials
Replies: 6
Views: 1407

Combining 2 tutorials

Hello All. I have completed a couple tutorials and I wanted to combine them. I have completed the logging temps with DHT11 and logging them onto Google docs, and I have completed the 1 wire thermometer with success as well. Links provided below. My next challenge was to combine the 2 projects. I hav...
by Mvlawn
Sat Jan 03, 2015 6:39 pm
Forum: Other projects
Topic: Any beekeepers out there?
Replies: 36
Views: 12021

Re: Any beekeepers out there?

Any updates on progress? I am looking at monitoring temp, humidity, and weight on 5 hives.

Vern

Go to advanced search