Go to advanced search

by Grumpy Mike
Tue Feb 12, 2019 10:57 pm
Forum: Advanced users
Topic: Using QEMU on the Pi.
Replies: 3
Views: 96

Re: Using QEMU on the Pi.

It is called S2Bot from http://www.picaxe.com/Teaching/Other-So ... per-Apps/
It is designed to take channel Bluetooth BLE messages in and out of Scratch. So I don't know if I would need a x86 version of Scratch as well.
by Grumpy Mike
Tue Feb 12, 2019 10:17 pm
Forum: Advanced users
Topic: Using QEMU on the Pi.
Replies: 3
Views: 96

Using QEMU on the Pi.

I have a package that is only available as a ready compiled X86 Linux version, with no access to the source code. Someone suggested that it might be possible to run this under QEMU. Has any one tried using QEMU on a Raspberry Pi using the latest image (downloaded just last week)? Does it work or not...
by Grumpy Mike
Tue Feb 12, 2019 6:58 pm
Forum: Python
Topic: GPIO setup as an INPUT
Replies: 2
Views: 77

Re: GPIO setup as an INPUT

can someone explain me this code? It reads data from an external MCP3008 analogue to digital converter which is attached to some of the GPIO pins. If you want to look at the data sheet you will see the internal structure of this chip and how it needs to be accessed, this code does that. The adcnum ...
by Grumpy Mike
Mon Feb 11, 2019 3:49 am
Forum: Python
Topic: What does "from . import *" mean.
Replies: 5
Views: 163

Re: What does "from . import *" mean.

Thanks guys, The email notification dosn't seem to be working so sorry for the delay. Yes it does seem a bit confusing, I did read one post where it was advised never to use it. Just to clear up a point ( pun intended ) is the current directory set automatically to the place where IDLE3 is running t...
by Grumpy Mike
Sun Feb 10, 2019 6:39 pm
Forum: Python
Topic: What does "from . import *" mean.
Replies: 5
Views: 163

What does "from . import *" mean.

The title says it all. I found this in some code that talks to a Bluetooth device but I have failed to find what it means.
I get the "import *" bit, I understand this to mean import all of the module, but what does the period mean? What is being used to import everything from?
by Grumpy Mike
Fri Dec 07, 2018 4:53 pm
Forum: Python
Topic: MIDI - occasional quit without error message
Replies: 0
Views: 123

MIDI - occasional quit without error message

I am simply reading the MIDI messages from a Korg nano keyboard. It works fine, but then after some random number of key presses the program simply quits with no error message. This is a example of the problem, striped down to the minimum. # #!/usr/bin/env python3 # MIDI crash minimum example import...
by Grumpy Mike
Fri Oct 05, 2018 7:50 am
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Thanks guys - it's a wrap. Got it going as a class libiary. The trick was the glitch_filter settings, it seems to work slightly faster in the class code. I was getting what the filter does wrong. It turns out the setting in the filter gives you the pulse size to ignore, so I had to take it to the ti...
by Grumpy Mike
Thu Oct 04, 2018 5:05 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

If cbf is a member of the class you refer to it as self.cbf within the class. Yes but it is not a member of the class I took it from the line on your original code cb[i] = pi.callback(i, pigpio.EITHER_EDGE, cbf) If I do use self.cbf then the whole thing goes into a loop spewing the callback print m...
by Grumpy Mike
Thu Oct 04, 2018 4:55 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

I'd guess the 1300 microseconds is too short a timeout. On the contrary, I have it working down to 80 microseconds. Although I think this might be milliseconds, which would make sense. However I am now attempting to put the code in to a class libiary and I am having trouble with defining the call b...
by Grumpy Mike
Wed Oct 03, 2018 8:00 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Are the pulses synchronized? No they are all displaced in time from each other. Do you care that the pulses are there or is the concern is if the pulses are not there? I want to know the state pulses or not as they represent the state of switches being pressed to transfer the pulses to the GPIO or ...
by Grumpy Mike
Wed Oct 03, 2018 1:32 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Thank you for the code you posted. I shortened the time you had to wait to see if a button had a stream or not, from one hour to 10 seconds. Unfortunately all the code did was to report random pins as being steady for too long. It occasionally reported the one pin that was not receiving pulses but a...
by Grumpy Mike
Tue Oct 02, 2018 9:19 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

If you are looking for a warning of a single missed pulse on any one of a number of inputs then it looks tough challenge for a pi without external hardware. Well no that is not quite the situation. I have 16 inputs, some of them will be receiving no pulses, others will be receiving a continuous str...
by Grumpy Mike
Tue Oct 02, 2018 1:52 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Thanks. However a) The Arduino Mega has 24 interrupt capable lines - not possible in your case but included for completeness Well you can have all the pins on an Uno generate an interrupt with the pin change interrupt if I was thinking of going down that route. Sadly I am not looking to change the O...
by Grumpy Mike
Tue Oct 02, 2018 12:35 pm
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Even some very small 8 pin devices can have an interrupt connected to the rising/falling edge of a GPIO pin. Yes but they don't have 16 interrupt capable pins. And then you have the trouble of communicating the results back to the Pi. Using an external microprocessor is not an option. The processor...
by Grumpy Mike
Tue Oct 02, 2018 10:09 am
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Re: Wait for edge - false timeout

Thanks for that. Unfortunately the pigpoid documentation for edge detection says:- Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a callback function. And as we know the call back functi...
by Grumpy Mike
Tue Oct 02, 2018 9:34 am
Forum: Python
Topic: Wait for edge - false timeout
Replies: 20
Views: 1010

Wait for edge - false timeout

I am having trouble with the wait_for_edge function in the RPi.GPIO libiary. I have a bunch of inputs which are being hit with 80uS pulses every 1.3mS. If they stop being hit like this I want to know. To this end I am using a wait_for_edge with a time out of 4ms and detecting when a timeout occurs. ...
by Grumpy Mike
Fri Sep 14, 2018 4:47 pm
Forum: Troubleshooting
Topic: Is it possible to run Xilinx ISE on the Pi
Replies: 3
Views: 272

Re: Is it possible to run Xilinx ISE on the Pi

Well after almost a week there has been no reply from Valentfx, I wonder if they have gone bust or is it just that they don't care. Anyway I started on an alternative solution and after a week of considerable effort I have managed to get my first LEDs blinking from a file I compiled myself. It looks...
by Grumpy Mike
Sat Sep 08, 2018 4:51 pm
Forum: Troubleshooting
Topic: Is it possible to run Xilinx ISE on the Pi
Replies: 3
Views: 272

Re: Is it possible to run Xilinx ISE on the Pi

Yes that is the one. However I haven't found that page with the contact tab, so maybe I should ask them?
Anyway do you know.
Cheers
by Grumpy Mike
Sat Sep 08, 2018 2:19 pm
Forum: Troubleshooting
Topic: Is it possible to run Xilinx ISE on the Pi
Replies: 3
Views: 272

Is it possible to run Xilinx ISE on the Pi

I have a Logi-pi FPGA board, and was hoping to develop some code to run on it. The instructions on the Logi-pi site seem to suggest you can run run Xilinx ISE on the Pi, but other web sites say you can't. I have down loaded the 7G or so tar file and unpacked it, but I can't get the xsetup to run. Sp...
by Grumpy Mike
Tue Sep 04, 2018 12:27 pm
Forum: Python
Topic: Bluetooth serial freezing
Replies: 23
Views: 3438

Re: Bluetooth serial freezing

Please le me know ASAP.
Let you know what. It freezes end of story.
If you want a fix go and ask the people who write Linux for the Pi.
by Grumpy Mike
Thu May 31, 2018 4:27 pm
Forum: Camera board
Topic: Quality Web Cam - not high res
Replies: 1
Views: 190

Quality Web Cam - not high res

I need a few quality Web Cams, just basic 640 x 480 resolution but it is pointing down at a light table. All the ones I have tried, including the Raspberry Pi's camera give washed out image. They seem resistance to accepting camera control parameters or to have those stick once they go through Pygam...
by Grumpy Mike
Sun May 27, 2018 9:10 am
Forum: Python
Topic: Pygame set_gamma doesn't work
Replies: 0
Views: 119

Pygame set_gamma doesn't work

Pygame set_gamma doesn't appear to work. I have tried gamma = 0.8 print(pygame.display.set_gamma(gamma,gamma,gamma)) and print(pygame.display.set_gamma(gamma)) and even pygame.display.set_gamma(gamma) The call is supposed to return true when successful and these calls in the print statement all prin...
by Grumpy Mike
Wed May 16, 2018 4:04 am
Forum: Python
Topic: Streaming a Pygame window
Replies: 2
Views: 278

Re: Streaming a Pygame window

Thanks for that.
It might do, I am after replaying clips from three Pi's on a big Mac ( without fries ).
by Grumpy Mike
Mon May 14, 2018 3:36 am
Forum: Python
Topic: Streaming a Pygame window
Replies: 2
Views: 278

Streaming a Pygame window

I have a Pygame window showing an animation. I would like stream this window over Wi-Fi or Ethernet for display on another remote computer. Most of the solutions I have seen on line involve saving each frame to a folder and then stitching them together as an animated GIF or converting them into a mo...
by Grumpy Mike
Fri Apr 27, 2018 12:07 pm
Forum: Troubleshooting
Topic: wrong i2c address
Replies: 13
Views: 8358

Re: wrong i2c address

write_byte(9, 0b00000000|0b00000000|0b00001100|0b00000001) #config

Is a rather silly line, it is the logic or of 4 bytes and could be replaced with:-
write_byte(9, 0b00001101) #config
Or even better if you replaced it with:-
write_byte(9, 0xD) #config

Go to advanced search