Go to advanced search

by rpiMike
Sat Sep 21, 2019 2:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Ublox Neo 6M GPS module not changing coords.
Replies: 32
Views: 402

Re: Ublox Neo 6M GPS module not changing coords.

Out of interest does the following show up any anomalies ? Ignoring any extremely minor rounding and -ve lat/lon. #!/usr/bin/env python3 import time,serial,pynmea2 def latLonToDecDegrees(val): DD = int(float(val)/100) MM = float(val) - DD * 100 return DD + MM/60 ser = serial.Serial('/dev/ttyACM0',96...
by rpiMike
Sat Sep 21, 2019 11:47 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Ublox Neo 6M GPS module not changing coords.
Replies: 32
Views: 402

Re: Ublox Neo 6M GPS module not changing coords.

We discovered that pnmea2 was doing something odd to the string as it parsed it.
The dd_to_sd function is mathematically correct, but the parsing was not.
Can you explain what the issue was here?

I'm using pynmea2 (in Cumbria,UK) and not seeing any issues.
by rpiMike
Fri Sep 20, 2019 2:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Ublox Neo 6M GPS module not changing coords.
Replies: 32
Views: 402

Re: Ublox Neo 6M GPS module not changing coords.

What output do you get if you run the following?

Code: Select all

import serial
import pynmea2

serialPort = serial.Serial("/dev/ttyAMA0", 9600, timeout=1)

while True:
    str = serialPort.readline()
    if str.find('GGA') > 0:
        print str.strip()
by rpiMike
Fri Sep 20, 2019 1:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Ublox Neo 6M GPS module not changing coords.
Replies: 32
Views: 402

Re: Ublox Neo 6M GPS module not changing coords.

Your python2 code does work on my ublox C94-M8P connected via usb.
by rpiMike
Fri Sep 20, 2019 1:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Ublox Neo 6M GPS module not changing coords.
Replies: 32
Views: 402

Re: Ublox Neo 6M GPS module not changing coords.

Your code appears to be Python2, i would suggest moving to Python3. There may be bug fixes in newer code.

I was confused with your code because serial.readline returns bytes in Python3.
by rpiMike
Wed Sep 18, 2019 10:45 am
Forum: Python
Topic: IF...OR statement not working as expected
Replies: 7
Views: 186

Re: IF...OR statement not working as expected

Should be easy to debug with some print statements: from gpiozero import MotionSensor, Button pir = MotionSensor(18) mag = Button(24) while True: md = pir.motion_detected wfr = mag.wait_for_release() print('pir.motion_detected',md) print('mag.wait_for_release()',wfr) if md or wfr: print('do stuff') ...
by rpiMike
Wed Sep 18, 2019 9:23 am
Forum: Python
Topic: Change in logic in sensor not breaking 'while' loop?
Replies: 3
Views: 114

Re: Change in logic in sensor not breaking 'while' loop?

I would have one main loop continually checking the collision detector and activating forward or backward according to time: import RPi.GPIO as GPIO import time import datetime GPIO.setmode(GPIO.BOARD) GPIO.setup(7,GPIO.IN, pull_up_down=GPIO.PUD_DOWN) #photoelectric sensor GPIO.setup(11,GPIO.OUT) GP...
by rpiMike
Fri Sep 13, 2019 8:01 pm
Forum: Graphics, sound and multimedia
Topic: VLC player not playing video
Replies: 2
Views: 134

Re: VLC player not playing video

Try omxplayer
by rpiMike
Thu Sep 12, 2019 11:10 am
Forum: Troubleshooting
Topic: Thonny issue
Replies: 13
Views: 221

Re: Thonny issue

Why are you wanting to run your code in Thonny for extended periods?

Surely more sensible to run your code from command line eg python3 test.py
by rpiMike
Tue Sep 10, 2019 7:56 pm
Forum: Python
Topic: Looping Video w/ External Triggers
Replies: 4
Views: 146

Re: Looping Video w/ External Triggers

I would use the omxplayer wrapper and it’s position() method. https://python-omxplayer-wrapper.readth ... en/latest/

You can keep 2 player instances in memory and flip between then to get frame to frame switching.
by rpiMike
Tue Sep 10, 2019 5:03 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3 and screen, need help
Replies: 1
Views: 49

Re: Raspberry Pi 3 and screen, need help

Your image link is broken.
by rpiMike
Mon Sep 02, 2019 6:18 am
Forum: Python
Topic: Audiobook - OMXplayer pause issue
Replies: 4
Views: 183

Re: Audiobook - OMXplayer pause issue

You might find the omxplayer wrapper helpful:

https://python-omxplayer-wrapper.readth ... en/latest/
by rpiMike
Wed Aug 28, 2019 9:25 pm
Forum: Troubleshooting
Topic: Noobs Installation not work
Replies: 12
Views: 307

Re: Noobs Installation not work

If your just after Raspbian why not just flash a Raspbian image to sd card with Etcher. It’s much simpler.
by rpiMike
Wed Aug 28, 2019 6:38 pm
Forum: Beginners
Topic: NOOBS 3.2.0 corrupt after running simple Pyton3 program
Replies: 8
Views: 218

Re: NOOBS 3.2.0 corrupt after running simple Pyton3 program

I'm guessing your using LibreOffice calc (rather than Excel) to open the csv file. That is probably locking the csv file so that your Python program can no longer write to the file. Try from a command line using 'tail humidity.csv' to output the last few lines of the csv file. This should not lock t...
by rpiMike
Wed Aug 28, 2019 4:23 pm
Forum: Beginners
Topic: NOOBS 3.2.0 corrupt after running simple Pyton3 program
Replies: 8
Views: 218

Re: NOOBS 3.2.0 corrupt after running simple Pyton3 program

Please edit your post and place your code in a code block. The loss of formatting makes the code invalid.

I suspect you've got an intensive loop.
by rpiMike
Wed Aug 28, 2019 3:48 pm
Forum: Troubleshooting
Topic: New Raspberry Pi 4B - nothing but problems
Replies: 10
Views: 521

Re: New Raspberry Pi 4B - nothing but problems

Are you sure the sd card is genuine? Have you got another sd card you can try?
by rpiMike
Wed Aug 28, 2019 2:20 pm
Forum: Troubleshooting
Topic: New Raspberry Pi 4B - nothing but problems
Replies: 10
Views: 521

Re: New Raspberry Pi 4B - nothing but problems

Is it the 1,2 or 4GB Pi4?

Do you ever see the low voltage (lightning) symbol?

I would suggest getting the official 5.1V / 3.0A power supply : https://www.raspberrypi.org/products/ty ... er-supply/
by rpiMike
Wed Aug 28, 2019 7:41 am
Forum: Troubleshooting
Topic: New Raspberry Pi 4B - nothing but problems
Replies: 10
Views: 521

Re: New Raspberry Pi 4B - nothing but problems

Which model of Pi4?
What make and model of sd card?
What power supply?
Are you using an hdmi screen and wired mouse and keyboard?

Did you flash ‘Raspbian Buster with Desktop’?
Is it fully updated?
by rpiMike
Tue Aug 27, 2019 3:51 pm
Forum: Beginners
Topic: Which Raspi to buy?
Replies: 3
Views: 217

Re: Which Raspi to buy?

You've not mentioned any price limit so I would recommend the Pi4 4GB, the official 5.1V / 3.0A USB-C power supply and a Micro HDMI to Standard HDMI cable.

I believe your monitor will required a usb connection for touch.
by rpiMike
Mon Aug 26, 2019 10:50 pm
Forum: Gaming
Topic: How to setup Minecraft 1.14.4 on Pi4 (Gentoo 64bit)
Replies: 13
Views: 1782

Re: How to setup Minecraft 1.14.4 on Pi4 (Gentoo 64bit)

Sorry, I left a link in to my last run script.

Try now.
by rpiMike
Sun Aug 25, 2019 6:06 pm
Forum: Gaming
Topic: How to setup Minecraft 1.14.4 on Pi4 (Gentoo 64bit)
Replies: 13
Views: 1782

How to setup Minecraft 1.14.4 on Pi4 (Gentoo 64bit)

How to setup Full Minecraft 1.14.4 (with Optifine) on Raspberry or Pi4 (using Gentoo 64bit) Please note : Do this at your own risk. If you have any doubts use a spare SD card. Pi4: I'm using the official 5.1V 3.0A power supply, with the Pi4 in an open sided case with small fan. This tutorial was te...
by rpiMike
Sun Aug 25, 2019 12:20 pm
Forum: Gaming
Topic: how emulate n64 on a raspberry pi 4
Replies: 3
Views: 721

Re: how emulate n64 on a raspberry pi 4

This is how I built mupen64plus: cd ~ sudo apt install libboost-dev sudo apt install libboost-filesystem-dev wget https://github.com/mupen64plus/mupen64plus-core/releases/download/2.5.9/mupen64plus-bundle-src-2.5.9.tar.gz tar -zxf mupen64plus-bundle-src-2.5.9.tar.gz cd mupen64plus-bundle-src-2.5.9/ ...
by rpiMike
Fri Aug 23, 2019 6:35 pm
Forum: Gaming
Topic: I managed to get Dolphin running on a Pi 2?!? (VERY SLOWLY)
Replies: 19
Views: 2825

Re: I managed to get Dolphin running on a Pi 2?!? (VERY SLOWLY)

My first attempt at running the Dolphin Emulator:

https://youtu.be/EeEVrx7rH8w
by rpiMike
Thu Aug 22, 2019 2:51 pm
Forum: Beginners
Topic: USB Hub for mouse and keyboard
Replies: 5
Views: 172

Re: USB Hub for mouse and keyboard

Go to advanced search