Go to advanced search

by ghp
Sat Dec 08, 2018 7:44 pm
Forum: Scratch
Topic: Rasp-Pi 3 + Scratch + GPIO problem
Replies: 7
Views: 145

Re: Rasp-Pi 3 + Scratch + GPIO problem

Hello, the commands you use are for gpioserver , which was build into the system by Tim Rowledge. Using your broadcasts, a LED on my system is blinking. scratch_gpio.png I start scratch 1.4 from raspbian menu start_scratch.png The version is ( in scratch. press help) scratch_version.png When you nee...
by ghp
Fri Dec 07, 2018 10:26 pm
Forum: Scratch
Topic: Rasp-Pi 3 + Scratch + GPIO problem
Replies: 7
Views: 145

Re: Rasp-Pi 3 + Scratch + GPIO problem

Hello, if you want to do simple things only, then try gpioserver. This is (current) scratch 1.4 with a build in hardware access. See https://www.raspberrypi.org/documentation/usage/scratch/ Similiar is available for scratch2. For scratchClient I am somewhat biased, as I have developed this for scrat...
by ghp
Thu Dec 06, 2018 6:02 pm
Forum: Scratch
Topic: Rasp-Pi 3 + Scratch + GPIO problem
Replies: 7
Views: 145

Re: Rasp-Pi 3 + Scratch + GPIO problem

There are some optional possibilities to connect hardware with scratch
- the 'scratchgpio8 ' approach,
- scratch 1.4 with the embedded 'gpioserver', gpio, pwm, servo, some common boards and more.
- scratch 1.4 or scratch2 with scratchClient.
- or some custom python script.
by ghp
Sat Dec 01, 2018 6:10 pm
Forum: Python
Topic: 12V Simple Pulse detection and count on Pi3 help12
Replies: 13
Views: 253

Re: 12V Simple Pulse detection and count on Pi3 help12

Hello, the PCF8591 is a 8-bit A/D and D/A converter used for example in Pi2Go robot. It does not directly solve the 12V to 3.3V level conversion you need and provides no isolation. If you go for an optocoupler solution, look for a 4N25 and a 1k resistor (which will need prox 10mA from the flowmeter)...
by ghp
Fri Nov 30, 2018 9:55 pm
Forum: Python
Topic: program stops at random
Replies: 8
Views: 201

Re: program stops at random

Hello, perhaps you want do try "nohup" in place of "nohub" ?
by ghp
Fri Nov 30, 2018 8:52 pm
Forum: Python
Topic: program stops at random
Replies: 8
Views: 201

Re: program stops at random

Hmm, when ssh terminal (putty ?) gets a ctrl-s, then output stops and program is halted. Ctrl-q restarts in these cases.
When I close putty using the [X], the process is stopped also.
Try to detach process from console with "nohup <command> &".
by ghp
Fri Nov 30, 2018 7:42 pm
Forum: Python
Topic: Need to stop multiple programs accessing a tiny screen at once
Replies: 2
Views: 90

Re: Need to stop multiple programs accessing a tiny screen at once

Hello,
you could use a named pipe (standard on linux) for this task: let the data sources write messages into the pipe, and write a third program which reads pipe and displays messages in display for some time.
example: https://www.roman10.net/2011/04/21/name ... n-example/
by ghp
Fri Nov 30, 2018 7:31 pm
Forum: Python
Topic: program stops at random
Replies: 8
Views: 201

Re: program stops at random

Hello,
looks pretty good here. How do you start this program ? Are there error messages when it stops ?
by ghp
Fri Nov 30, 2018 6:50 pm
Forum: Python
Topic: Temp sensor activating fan
Replies: 2
Views: 73

Re: Temp sensor activating fan

There are a lot of tutorials around , one example is https://mydevices.com/article/connect-temperature-sensor-tmp36-to-a-raspberry-pi-breadboard/ And https://www.digikey.com/en/maker/projects/f3fa09ab84c049d08474b625bee8d8f2 Or go for an electronics only solution and use a simple comparator http://w...
by ghp
Fri Nov 30, 2018 6:38 pm
Forum: Python
Topic: Scheduler
Replies: 1
Views: 61

Re: Scheduler

google tells me that there is https://pypi.org/project/schedule/. Could do what you need.
by ghp
Fri Nov 30, 2018 6:35 pm
Forum: Python
Topic: PROBLEM : MAX31850 interfacing with RPi_3B+ using 1-wire protocol in python
Replies: 2
Views: 91

Re: PROBLEM : MAX31850 interfacing with RPi_3B+ using 1-wire protocol in python

Hello, most possible python in linux is not accurate enough to drive this device. Found some c-code in https://github.com/danjperron/BitBangingDS18B20 which might help you, covers also the MAX31850. There are some remarks about this in the issues "Raspberry Pi 3 and MAX31850 (now working!)". Basical...
by ghp
Fri Nov 30, 2018 5:45 am
Forum: Python
Topic: Remote I2c
Replies: 2
Views: 88

Re: Remote I2c

Hello, which "proportional solenoid valves" do you use ?
by ghp
Wed Nov 28, 2018 9:04 pm
Forum: Python
Topic: 12V Simple Pulse detection and count on Pi3 help12
Replies: 13
Views: 253

Re: 12V Simple Pulse detection and count on Pi3 help12

Hello, think there are two problems to solve for a precise and reliable flowmeter application. (1) is an interface problem. Flowmeters usually have hallsensor with open collector output. Usually you have long distances from computer to appliance, which raises interference, spikes, radiofrequence pro...
by ghp
Tue Nov 27, 2018 8:23 pm
Forum: Python
Topic: 12V Simple Pulse detection and count on Pi3 help12
Replies: 13
Views: 253

Re: 12V Simple Pulse detection and count on Pi3 help12

Hello, found a nice device which possibly matches your needs: https://www.exp-tech.de/zubehoer/labor/chemie/6608/ezo-universal-flow-meter-totalizer Another option would be to use an adafruit feather, backed up by a battery, fast as a 120MHz Cortex M4. You could use digital serial, SPI or I2C to talk...
by ghp
Tue Nov 27, 2018 9:25 am
Forum: Python
Topic: sensor e18-d80nk trouble
Replies: 1
Views: 57

Re: sensor e18-d80nk trouble

Think you should check the sensor first. The datasheet says that this sensor is an 'open collector interface' type. It needs a pullup resistor to 3.3V for a raspberry. You can try if the sensor is working by disconnect raspberry GPIO (important!) and connect a LED with a series resistor between outp...
by ghp
Mon Nov 26, 2018 7:00 pm
Forum: Python
Topic: How to update variable value in one line
Replies: 6
Views: 146

Re: How to update variable value in one line

Not as smart as curses, but works using CR:

Code: Select all

import time
print()
for i in range(29):
    print( "\r{i:4d}".format(i=i), end='')
    time.sleep(1)
print()
by ghp
Mon Nov 26, 2018 9:36 am
Forum: Python
Topic: gpio input pin constantly on low
Replies: 2
Views: 86

Re: gpio input pin constantly on low

Your code looks good. Unfortunately there are many more possible problems. BCM/ BOARD You mention "GPIO pin 15", but you set the mode to GPIO.setmode(GPIO.BCM). Please check if you are using PIN 15 on the GPIO header or the GPIO15, which is on PIN 10. GPIO 15 double usage If you use GPIO 15, be awar...
by ghp
Sun Nov 25, 2018 7:43 pm
Forum: Python
Topic: protect a python code
Replies: 7
Views: 239

Re: protect a python code

See https://wiki.python.org/moin/Asking%20for%20Help/How%20do%20you%20protect%20Python%20source%20code%3F Or https://stackoverflow.com/questions/261638/how-do-i-protect-python-code Cited from one of the answers of this last post: "You must use the right tool to do the right thing, and Python was not...
by ghp
Sun Nov 25, 2018 4:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c RTC and second sensor problems
Replies: 4
Views: 319

Re: i2c RTC and second sensor problems

The idea is to separate 5-V-domain from 3.3V-domain.
See https://playground.arduino.cc/Main/I2CB ... velShifter
Think something like http://www.adafruit.com/products/757 could help solving the problem.
by ghp
Sun Nov 25, 2018 12:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c RTC and second sensor problems
Replies: 4
Views: 319

Re: i2c RTC and second sensor problems

Some 20cm long wires should not be a problem. Perhaps you could provide a sketch of the wiring? Could be that the combination of 3.3V and 5V devices causes a problem with the different pullup on the I2C lines. Pi uses 2.2k pullup to 3.3V, the adafruit clock board uses 10k to VCC which is according t...
by ghp
Sun Nov 25, 2018 11:15 am
Forum: Python
Topic: Program to read sensor
Replies: 4
Views: 133

Re: Program to read sensor

Hello, many sensor can be driven with a 3.3V supply voltage too. What type of sensor do you use ? Your code needs better identation, at least the copy here in the forum looks scrambled. The code does the following: it loops each second and checks what level the input has. It counts how often it foun...
by ghp
Sat Nov 24, 2018 3:08 pm
Forum: Français
Topic: exporter les données vers port Usb
Replies: 1
Views: 118

Re: exporter les données vers port Usb

Bonjour, il serait préférable de demander ici en anglais. Mais il y a aussi un forum francophone ici: https://www.raspberrypi.org/forums/viewforum.php?f=65 What I understood: you write a program which needs to write data (excel sheet) to an USB stick. Right ? On a pi, the USB sticks are mounted in /...
by ghp
Sat Nov 24, 2018 2:53 pm
Forum: Python
Topic: Help starting programs at boot
Replies: 1
Views: 87

Re: Help starting programs at boot

by ghp
Sat Nov 24, 2018 2:35 pm
Forum: Python
Topic: I am trying to turn on LED via LAN
Replies: 3
Views: 170

Re: I am trying to turn on LED via LAN

Hello, the decode-method should be written as data = data.decode('utf-8') This makes the code work. What is helpful here to write the received data to console also like while True: data = conn.recv(BUFSIZ) # Receive data sent from the client data = data.decode('utf-8') # write the result of decode i...
by ghp
Fri Nov 23, 2018 8:36 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: No SG90 servo motion from PCA9685 connected servo
Replies: 1
Views: 126

Re: No SG90 servo motion from PCA9685 connected servo

Hello, perhaps it is the bus number. This board and software is quite long on the market and in good old times the i2c bus number was 0, now it is 1. You use this already for the i2cdetect tool. # Alternatively specify a different address and/or bus: #pwm = Adafruit_PCA9685.PCA9685(address=0x41, bus...

Go to advanced search