Go to advanced search

by Casper2017
Mon Oct 09, 2017 8:19 am
Forum: Python
Topic: GPIO pins counting pulses
Replies: 10
Views: 2808

Re: GPIO pins counting pulses

What do you mean be serious, obviously you did not read the post correctly.

Massi wrote:
Thu Oct 05, 2017 1:36 pm
Casper2017 wrote:
Thu Oct 05, 2017 12:17 pm
I have tried looking at RPM counters with no luck.
Come on, be serious.
by Casper2017
Thu Oct 05, 2017 12:17 pm
Forum: Python
Topic: GPIO pins counting pulses
Replies: 10
Views: 2808

GPIO pins counting pulses

Hi Just looking for a simple program that I can count pulses per second on the GPIO pins, I have tried looking at RPM counters with no luck. I have successfully set the GPIO pins to outputs lighting up a led with success it is just reading the input on the GPIO pins I am having great trouble with. C...
by Casper2017
Sat Sep 30, 2017 1:13 pm
Forum: Python
Topic: Time Function
Replies: 33
Views: 14359

Re: Time Function

Thanks, that works extremely well, easy program. Problem solved. :D :D :D :D :D :D Read the manual ( https://docs.python.org/2/library/time.html ) c = time.time() returns the time in seconds since the epoch as a floating point number. time.sleep(x) suspends execution of the current thread for the x ...
by Casper2017
Tue Sep 26, 2017 1:41 pm
Forum: Python
Topic: Time Function
Replies: 33
Views: 14359

Time Function

Hi Just checking the time function to sleep for 1 second gives a read out of "1506432732.6106627" Why would this not be accurate, should it be giving a result closer to one second.. I was hoping to use the time function to read the GPIO pins every one second when using it for measuring wind speed Th...
by Casper2017
Fri Sep 22, 2017 3:52 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

I have the two different sensors working on the same line with the code below running for more then 4 days without a problem. Maxim DS18B20+, Temperature Sensor -55 → +125 °C ±0.5°C 1-Wire TO-92, 3-Pin, RS Stock No. 540-2805 Maxim DS18B20+PAR Temperature Sensor, -55 → +125 °C, 3-Pin TO-92, RS Stock ...
by Casper2017
Thu Sep 21, 2017 3:53 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

I added this line of code which has solved the problem.

I am not looking for temperatures above 85C, this line of code is working fine.

Thanks.

if temp1 > 84:
time.sleep(1)
else:
print('SENSOR 1 :',temp1)
by Casper2017
Thu Sep 21, 2017 3:50 am
Forum: Python
Topic: DS18B20 and the DS18B20+Par
Replies: 3
Views: 640

Re: DS18B20 and the DS18B20+Par

Yes I removed the two lines and it is working fine.


Thanks.
by Casper2017
Tue Sep 19, 2017 11:27 am
Forum: Python
Topic: Any simple Timing program activated by the GPIO pins.
Replies: 2
Views: 732

Any simple Timing program activated by the GPIO pins.

Hi Is there any simple programs around to start a counter on the Raspberry PI. For example if a hall effect sensor or photocell, switch etc is connected to one of the GPIO ports it starts the counter or a time count until the sensor is activated again. I have looked around on the web, can not really...
by Casper2017
Tue Sep 19, 2017 11:05 am
Forum: Python
Topic: DS18B20 and the DS18B20+Par
Replies: 3
Views: 640

Re: DS18B20 and the DS18B20+Par

I have added the one line to the /boot/config.txt

I will remove those 2 lines from the program and see how it runs.
by Casper2017
Tue Sep 19, 2017 10:22 am
Forum: Python
Topic: DS18B20 and the DS18B20+Par
Replies: 3
Views: 640

DS18B20 and the DS18B20+Par

Just reporting what I have succeeded in so far and extremely happy with the results. I have purchased DS18B20 and the DS18B20+Par. With the DS18B20+Par it dose give false readings, tried all sorts of ways of connecting, hardware and programing in python 3 and the DS18B20+Par still gives problems. No...
by Casper2017
Sat Sep 16, 2017 9:43 am
Forum: Python
Topic: What to do with “Unexpected indent” in python 3? "while True:
Replies: 7
Views: 3505

Re: What to do with “Unexpected indent” in python 3? "while True:

Thank you.

That helps, several problems solved. :D
by Casper2017
Wed Sep 13, 2017 10:13 am
Forum: Python
Topic: What to do with “Unexpected indent” in python 3? "while True:
Replies: 7
Views: 3505

What to do with “Unexpected indent” in python 3? "while True:

Hi When writing a simple program to a complex program and you know it works fine, when a "while True: is placed in the program so it will repeat all one gets is Unexpected Indent, this totally ruins the program. I could give several program examples, the trouble is python 3 seems to be showing this ...
by Casper2017
Mon Sep 11, 2017 3:21 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

It now works 100% without errors. :D Purchasing this item from Radio Spares appears to work fine and with any code from what I can fine. Maxim DS18B20+, Temperature Sensor -55 → +125 °C ±0.5°C 1-Wire TO-92, 3-Pin, RS Stock No. 540-2805 The problem is with this Maxim DS18B20+PAR Temperature Sensor, -...
by Casper2017
Sun Sep 10, 2017 4:19 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

I ran your code as instructed, thanks, still getting 85 error. import os import time import datetime import glob from time import strftime os.system('modprobe w1-gpio') os.system('modprobe w1-therm') #temp_sensor = '/sys/bus/w1/devices/28-00000781336e/w1_slave' device_file = "/sys/bus/w1/devices/28-...
by Casper2017
Sun Sep 10, 2017 3:56 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

Any programs that I run this error 85 all ways appears. This is the original code I used and the other codes still produce the same result. import os import time import datetime import glob from time import strftime os.system('modprobe w1-gpio') os.system('modprobe w1-therm') temp_sensor = '/sys/bus...
by Casper2017
Sun Sep 10, 2017 3:39 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

Well it would have been nice if you posted the errors you got instead of leaving us guessing. but looking at your posted code you did not make the changes required to use the code I posted. So I have done it for you import os import time import datetime import glob from time import strftime os.syst...
by Casper2017
Sat Sep 09, 2017 12:05 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

Hi Try replacing this section of your code def tempRead(): t = open(temp_sensor, 'r') lines = t.readlines() t.close() temp_output = lines[1].find('t=') if temp_output != -1: temp_string = lines[1].strip()[temp_output+2:] temp_c = float(temp_string)/1000.0 return round(temp_c,1) with this def read_t...
by Casper2017
Sat Sep 09, 2017 12:00 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

At which point in your code exactly do you get the "error" number? temp_output = lines[1].find('t=') if temp_output != -1: temp_string = lines[1].strip()[temp_output+2:] temp_c = float(temp_string)/1000.0 return round(temp_c,1) I'm not familiar with Python. Still, what exactly is returned if temp_o...
by Casper2017
Sat Sep 09, 2017 8:05 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

In the "sudo nano /boot/config.txt" I have to use this" dtoverlay=w1-gpio,pullup=on" otherwise a constant 85.


I will try your method and see what happens.
by Casper2017
Sat Sep 09, 2017 5:44 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

This is the code I am using, Python 3. import os import time import datetime import glob from time import strftime os.system('modprobe w1-gpio') os.system('modprobe w1-therm') temp_sensor = '/sys/bus/w1/devices/28-00000781336e/w1_slave' def tempRead(): t = open(temp_sensor, 'r') lines = t.readlines(...
by Casper2017
Sat Sep 09, 2017 5:39 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

I'm sure somewhere in some post a few month back, someone mentioned why this happens and it the basic 'driver code'. I think he wrote the micro:bit code used on them. But if your data shouldn't have an 85 reading, just throw it out straight after the reading so it doesn't interfere. To correct myse...
by Casper2017
Sat Sep 09, 2017 5:36 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

How have you got the sensor wired ? if you have it wired for parasite power it can cause this error. you should be powering it from 3.3v via 4.7k resistor https://thepihut.com/blogs/raspberry-pi-tutorials/18095732-sensors-temperature-with-the-1-wire-interface-and-the-ds18b20 Is your code checking t...
by Casper2017
Sat Sep 09, 2017 5:32 am
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

Re: DS18B20 Temperature Sensor with Raspberry Pi error 85

How have you got the sensor wired ? if you have it wired for parasite power it can cause this error. you should be powering it from 3.3v via 4.7k resistor https://thepihut.com/blogs/raspberry-pi-tutorials/18095732-sensors-temperature-with-the-1-wire-interface-and-the-ds18b20 Is your code checking t...
by Casper2017
Fri Sep 08, 2017 12:23 pm
Forum: General discussion
Topic: DS18B20 Temperature Sensor with Raspberry Pi error 85
Replies: 28
Views: 4989

DS18B20 Temperature Sensor with Raspberry Pi error 85

Hi I have the DS18B20 working extremely well, just occasionally error 85 appears. Is there any way of stopping this. All the connections are correct. only a 6 inch cable connected to the Pi. Out of 100 readings it will just appear about 5 times, but it can give false signals and interfere with the c...
by Casper2017
Wed Aug 02, 2017 10:24 am
Forum: General discussion
Topic: ssh not being able to log in, ssh keys appearing, usisng a Mac with OS Sierra
Replies: 7
Views: 1342

Re: ssh not being able to log in, ssh keys appearing, usisng a Mac with OS Sierra

Only using one Pi, this Mac laptop would just not want to hook up to the Pi. Tried the Pi on several computers and other networks not a problem, this Mac just refused to connect. Also what I noticed this Mac Laptop would not ping the Pi, but would ping Google or any other site. It was a school compu...

Go to advanced search