Go to advanced search

by joan
Fri Jun 18, 2021 9:17 pm
Forum: Python
Topic: Simple python code to read temp from DS18B20 sensor
Replies: 4
Views: 169

Re: Simple python code to read temp from DS18B20 sensor

#!/usr/bin/env python import glob import time # DS18B20.py # 2016-04-25 # Public Domain # Typical reading # 73 01 4b 46 7f ff 0d 10 41 : crc=41 YES # 73 01 4b 46 7f ff 0d 10 41 t=23187 while True: for sensor in glob.glob("/sys/bus/w1/devices/28-00*/w1_slave"): id = sensor.split("/&qu...
by joan
Fri Jun 18, 2021 7:48 am
Forum: General
Topic: Pi Pico
Replies: 12
Views: 565

Re: Pi Pico

Without any added rules reboot, login, then connect your picos.

Then give the result of "ls -l /dev/ttyACM*".
by joan
Thu Jun 17, 2021 10:10 pm
Forum: General
Topic: Pi Pico
Replies: 12
Views: 565

Re: Pi Pico

My system doesn't have any rules and automatically creates /dev/ttyACMx. Perhaps the rule you added is the problem.
by joan
Wed Jun 16, 2021 5:41 pm
Forum: Beginners
Topic: Access Pico GPIO via usb
Replies: 4
Views: 240

Re: Access Pico GPIO via usb

by joan
Sat Jun 12, 2021 11:29 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Arbitrary GPIO Pins For I2C?
Replies: 3
Views: 187

Re: Arbitrary GPIO Pins For I2C?

Look in /boot/overlays/README for help on setting up a software I2C bus.
by joan
Fri Jun 11, 2021 9:07 pm
Forum: General
Topic: What are these duplicate function pins?
Replies: 6
Views: 380

Re: What are these duplicate function pins?

You can use any GPIO you want as long as it is the correct function/channel.
by joan
Fri Jun 11, 2021 9:04 pm
Forum: Automation, sensing and robotics
Topic: Running Ultrasonic Sensor on RP4 with MCP3008
Replies: 11
Views: 476

Re: Running Ultrasonic Sensor on RP4 with MCP3008

Have you connected a ground between the sensor and the Pi/ADC? A common ground is needed so that there is a common voltage reference.
by joan
Fri Jun 11, 2021 7:30 pm
Forum: Automation, sensing and robotics
Topic: Running Ultrasonic Sensor on RP4 with MCP3008
Replies: 11
Views: 476

Re: Running Ultrasonic Sensor on RP4 with MCP3008

There is no indication or sign of a ground connection between the sensor and the ADC/Pi.
by joan
Fri Jun 11, 2021 5:12 pm
Forum: Troubleshooting
Topic: TSOP-1738 IR Receiver on Pi 4 not working
Replies: 2
Views: 96

Re: TSOP-1738 IR Receiver on Pi 4 not working

Try looking at the signal on piscope.

http://abyz.me.uk/rpi/pigpio/piscope.html
by joan
Thu Jun 10, 2021 3:29 pm
Forum: Beginners
Topic: Counting pulses by powering 16 hall sensors using an external power in one RPI-4
Replies: 6
Views: 246

Re: Counting pulses by powering 16 hall sensors using an external power in one RPI-4

The following code does pretty much the same thing. #!/usr/bin/env python import time import datetime import pigpio # changed GPIO 0 to 5 GPIOS = [2, 3, 4, 17, 27, 22, 10, 9, 11, 5, 15, 25, 18, 23, 24, 8] TOTAL = [0] * 32 def mfpxx(gpio, level, tick): global TOTAL TOTAL[gpio] += 1 dt = datetime.date...
by joan
Thu Jun 10, 2021 10:20 am
Forum: Beginners
Topic: Counting pulses by powering 16 hall sensors using an external power in one RPI-4
Replies: 6
Views: 246

Re: Counting pulses by powering 16 hall sensors using an external power in one RPI-4

I doubt it's a power problem. I suggest you simulate the inputs and see if you have a problem with simulated data.
by joan
Thu Jun 10, 2021 7:53 am
Forum: Beginners
Topic: Counting pulses by powering 16 hall sensors using an external power in one RPI-4
Replies: 6
Views: 246

Re: Counting pulses by powering 16 hall sensors using an external power in one RPI-4

Unless a script is large show it in-line. #!/usr/bin/env python import sys import RPi.GPIO as GPIO import time import datetime total11 = total12 = total21 = total22 = total31 = total32 = total41 = total42 = 0 total51 = total52 = total61 = total62 = total71 = total72 = total81 = total82 = 0 hs11=2 hs...
by joan
Wed Jun 09, 2021 9:00 am
Forum: Troubleshooting
Topic: SPI DEV CE0 / CS / Chip Select Active High
Replies: 6
Views: 193

Re: SPI DEV CE0 / CS / Chip Select Active High

Post a link to the datasheet of the device. Without the SPI spec it is pointless our trying to help.
by joan
Mon Jun 07, 2021 7:45 am
Forum: SDK
Topic: Question: gpio_set_irq_enabled_with_callback
Replies: 1
Views: 163

Re: Question: gpio_set_irq_enabled_with_callback

My memory of looking at the source code is that there is a single GPIO callback function.
by joan
Mon Jun 07, 2021 7:42 am
Forum: SDK
Topic: I2C I'm stuck
Replies: 4
Views: 243

Re: I2C I'm stuck

It sounds like you are getting confused between pin numbers and the GPIO numbers. The software SDK expects GPIO numbers. The GPIO are marked GP in the following. Top view USB GP0 o o VBUS GP1 o o VSYS GND o o GND GP2 o o 3V3_EN GP3 o o 3V3 GP4 o o ADC_VREF GP5 o o GP28_ADC GND o o AGND GP6 o o GP27_...
by joan
Sat Jun 05, 2021 8:56 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Level Shifter
Replies: 14
Views: 639

Re: SPI Level Shifter

What is the problem?

Please show the software you are using and explain what you think should happen and what actually happens.
by joan
Sat Jun 05, 2021 7:41 am
Forum: Automation, sensing and robotics
Topic: DC motors only go forward not backwards
Replies: 6
Views: 391

Re: DC motors only go forward not backwards

As Forris suggests.

Likeliest problem first.
  1. wiring
  2. software
  3. Pi GPIO faulty
  4. Motor is designed to turn one way only
You can use https://elinux.org/R-Pi_Troubleshooting#Testing to check the GPIO.
by joan
Sat Jun 05, 2021 7:36 am
Forum: SDK
Topic: SDK 1.2 USB CDC problem
Replies: 12
Views: 460

Re: SDK 1.2 USB CDC problem

In that post I asked for advice on if there were any parameters that could be tuned to which I didn't get an answer - just an assumption I was either lying or incompetent Not so. You were asked to provide a small testable example of the problem. It's amazing how many problems disappear during the p...
by joan
Wed Jun 02, 2021 3:28 pm
Forum: Off topic discussion
Topic: "Right to Repair Legislation and the Raspberry Pi"
Replies: 147
Views: 5219

Re: "Right to Repair Legislation and the Raspberry Pi"

By the time (if ever) this becomes law the Pi will probably be a single chip on a board connected to a bank of USB6 connectors for I/O. Job done as nothing to repair. You seem to have missed the point here. It will be an EU directive (i.e. law) in Q4 this year from the date it is published in the O...
by joan
Wed Jun 02, 2021 3:06 pm
Forum: General
Topic: SPI for >16 bits?
Replies: 9
Views: 457

Re: SPI for >16 bits?

I did not suggest bit banging. I suggested you use the SPI hardware with an appropriate word size (it can be set to a word size between 4 and 16 bits).
by joan
Tue Jun 01, 2021 8:46 pm
Forum: Off topic discussion
Topic: "Right to Repair Legislation and the Raspberry Pi"
Replies: 147
Views: 5219

Re: "Right to Repair Legislation and the Raspberry Pi"

By the time (if ever) this becomes law the Pi will probably be a single chip on a board connected to a bank of USB6 connectors for I/O. Job done as nothing to repair.
by joan
Tue Jun 01, 2021 7:31 pm
Forum: General
Topic: SPI for >16 bits?
Replies: 9
Views: 457

Re: SPI for >16 bits?

Toggle the CS line yourself.

Transfer 3 8-bit words to shift the 20 bits. Most devices will ignore surplus clocks, if yours doesn't perhaps transfer 2 10-bit words instead.
by joan
Tue Jun 01, 2021 3:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: gpio interface stops responding after a week or 2.
Replies: 2
Views: 146

Re: gpio interface stops responding after a week or 2.

You need to find out why it stops responding. It's not useful to speculate on a recovery method until you know what is going wrong.

Go to advanced search