Go to advanced search

by AndersM
Sat Mar 17, 2018 10:31 am
Forum: HATs and other add-ons
Topic: Realtek RTL8192EU ID 0BDA:818B
Replies: 221
Views: 105152

Re: Realtek RTL8192EU ID 0BDA:818B

Thanks!
:)
by AndersM
Fri Mar 16, 2018 4:56 pm
Forum: HATs and other add-ons
Topic: Realtek RTL8192EU ID 0BDA:818B
Replies: 221
Views: 105152

Re: Realtek RTL8192EU ID 0BDA:818B

I just upgraded the PI and had forgotten about the Wi-fi driver problem. If I had remembered I should have avoided the upgrade... Now running install-wifi I get: Your current kernel revision = 4.9.80-v7+ Your current kernel build = #1098 Checking for a wifi module to determine the driver to install....
by AndersM
Thu Nov 23, 2017 7:00 pm
Forum: Automation, sensing and robotics
Topic: Changing battery running Pi
Replies: 9
Views: 1519

Re: Changing battery running Pi

In the second, the gate will only be pulled low if the right-hand transistor is off, which will only happen if the left-hand transistor is on, which in turn will only happen if the input voltage is the same as or higher than the output voltage. Thus, current can only flow in one direction, which is...
by AndersM
Wed Nov 22, 2017 7:22 pm
Forum: Automation, sensing and robotics
Topic: Changing battery running Pi
Replies: 9
Views: 1519

Re: Changing battery running Pi

At the top left corner of the schematic of the Pi https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/Raspberry-Pi-3B-V1.2-Schematics.pdf is an "ideal diode" It has the advantage of almost no voltage drop. So if you wish to go for a much more complicated solution, build two of...
by AndersM
Tue Nov 21, 2017 5:01 pm
Forum: Automation, sensing and robotics
Topic: Changing battery running Pi
Replies: 9
Views: 1519

Re: Changing battery running Pi

its never a good idea to connect a discharged battery to a charged battery as high currents can end up flowing between the 2 batteries, you may also see voltage spikes when doing this. Yes, these are kind of complications I anticipated. I thought it might require some circuitry including maybe a la...
by AndersM
Mon Nov 20, 2017 6:37 pm
Forum: Automation, sensing and robotics
Topic: Changing battery running Pi
Replies: 9
Views: 1519

Changing battery running Pi

Hi! I'm planning to use a raspberry pi to collect sensor data for a couple of days, approx. 3*24h. I have to run the Pi on batteries. I have a number of power-packs (5V USB 7800 mAh) and can switch batteries a few times a day. What is the best set up to make it possible to continuously run the Pi an...
by AndersM
Sun Nov 05, 2017 4:57 pm
Forum: HATs and other add-ons
Topic: Realtek RTL8192EU ID 0BDA:818B
Replies: 221
Views: 105152

Re: Realtek RTL8192EU ID 0BDA:818B

The script worked like a charm!
Mr. Engman you're a life saver!
by AndersM
Wed Jan 06, 2016 1:15 pm
Forum: Graphics, sound and multimedia
Topic: Small stop motion program for Pi Camera
Replies: 0
Views: 647

Small stop motion program for Pi Camera

As Pi Camera is small I thought it would be fun to play with stop motion animation. (The youngest son is in the LEGO-animation age...) Having OpenCV3 installed I made a small python program for recording animations. It can handle camera up side down (it is easier to get low down that way) and overla...
by AndersM
Sat Oct 24, 2015 8:16 pm
Forum: Python
Topic: Very simple tracking algorithm
Replies: 13
Views: 2269

Re: Very simple tracking algorithm

Anders you are a genius :D thank you for taking the time to think about it. I've adopted your second idea and it works ... Thanks :) with one small flaw. When it works out the average position it gets it wrong when the difference is greater than 180 degrees, e.g. when one is 315 and another is 45, ...
by AndersM
Wed Oct 21, 2015 8:50 am
Forum: Java
Topic: Java Tutorial
Replies: 6
Views: 3345

Re: Java Tutorial

Oracle can.
by AndersM
Sun Oct 18, 2015 4:59 pm
Forum: Python
Topic: time.sleep outside while loop
Replies: 2
Views: 810

Re: time.sleep outside while loop

You have 1 second delay when the program starts before the GPIO pin 38 is set to input. Then you have 1 second between each new round in the loop. That means that the GPIO pin is checked every second but that the first check is made directly after setting the pin. If you want to have a delay before ...
by AndersM
Sat Oct 17, 2015 8:58 am
Forum: Python
Topic: car dash cam that will record my journey onto a USB stick
Replies: 4
Views: 1245

Re: A better way?

I like the idea of using a recording flag and acting on the release of the button. when the recording is set to true/false I assume i need to use that elsewhere in the code? i.e add a 'camera.stop_recording()' Second thoughts: Since you would like to keep the with picamera.PiCamera() as camera: sta...
by AndersM
Fri Oct 16, 2015 8:59 am
Forum: Python
Topic: car dash cam that will record my journey onto a USB stick
Replies: 4
Views: 1245

Re: A better way?

Might have misunderstood your code but it looks like: a) If you press Rec button more than half a second when pressing it to stop the recording it will restart the recording as it returns to the choice-loop with the Rec button down. b) The program is stuck on the line GPIO.wait_for_edge(17, GPIO.FAL...
by AndersM
Tue Oct 13, 2015 11:35 am
Forum: Astro Pi
Topic: Astro Pi Magnetometer Not working
Replies: 8
Views: 2552

Re: Astro Pi Magnetometer Not working

I had a frustrating time not getting the IMU to work when I first tried. Then I found out that my problem was a polling issue.
See this thread. Could this be the issue here too?
by AndersM
Mon Oct 12, 2015 8:31 am
Forum: Python
Topic: Very simple tracking algorithm
Replies: 13
Views: 2269

Re: Very simple tracking algorithm

Thought a little more. If two active sensors means that the target is in between the two sensors you can us the fact that Python uses True=1 and False=0 to calculate the target angle: angle=0 while True: inN=GPIO.input(IR_N) inNE=GPIO.input(IR_NE) ... inNW=GPIO.input(IR_NW) try: angle= ((360*(inN an...
by AndersM
Mon Oct 12, 2015 8:04 am
Forum: Astro Pi
Topic: Animating The Sense Hat
Replies: 7
Views: 2423

Re: Animating The Sense Hat

If the code is the exact code in your program there are errors in the syntax of the lists: Remove the last , image_1 = [ o,o,x,x,x,x,o,o, o,o,x,x,x,x,o,o, o,o,x,x,x,x,o,o, o,o,x,x,x,x,o,o, o,x,x,x,x,x,x,o, x,o,o,o,o,o,o,x, x,o,o,o,o,o,o,x, x,x,o,o,o,o,x,x, ] Remove the last , and add a closing ] ima...
by AndersM
Sun Oct 11, 2015 5:41 pm
Forum: Python
Topic: Very simple tracking algorithm
Replies: 13
Views: 2269

Re: Very simple tracking algorithm

Could you calculate the position first and then signal the motor? If the PIR just signals active/inactive a solution like this could be possible: *Generate a number by adding the active sensors together with the sensors being numbered N 1, NE 2, E 4, SE 8, ... NW 128. *Use the generated number to fi...
by AndersM
Sun Oct 11, 2015 4:07 pm
Forum: Astro Pi
Topic: Buttons
Replies: 5
Views: 2003

Re: Buttons

:)

Hm ... how do I turn it on again? ;)

The lack of on/off switch is a bit annoying.
by AndersM
Sun Oct 11, 2015 9:45 am
Forum: Astro Pi
Topic: Animating The Sense Hat
Replies: 7
Views: 2423

Re: Animating The Sense Hat

Use a while loop.

An infinite loop:
Basic

Code: Select all

10 do things
20 goto 10
Python

Code: Select all

while True :
     do things
by AndersM
Sun Oct 11, 2015 9:39 am
Forum: Astro Pi
Topic: Buttons
Replies: 5
Views: 2003

Re: Buttons

I need someway to have the sensehat run a shutdown command since it will be run headless Have you tried this new stick class ? EDIT: Made a test script called stickpoweroff.py based on the new class: from sense_hat import SenseStick import os stick = SenseStick() for event in stick: if event.key ==...
by AndersM
Tue Oct 06, 2015 2:41 pm
Forum: Graphics, sound and multimedia
Topic: Storing Data from analog inputs
Replies: 4
Views: 803

Re: Storing Data from analog inputs

CSV is read by most analysing software
by AndersM
Tue Oct 06, 2015 11:10 am
Forum: Automation, sensing and robotics
Topic: reading serial data from sensor
Replies: 11
Views: 2640

Re: reading serial data from sensor

I practically always use a thread for serial communication. This way is not on the main loop and it could be asynchronous. I made a small "pong" game to test my analog input using a separate thread for reading the input. It works fine so I will continue down that path. #!/usr/bin/env python import ...
by AndersM
Tue Sep 29, 2015 11:33 am
Forum: Beginners
Topic: Run python program with a switch
Replies: 1
Views: 413

Re: Run python program with a switch

One possibilty could be to change the python program you want to run so it waits until a gpio signal is read to execute the main task, and then goes back into waiting for a new gpio-input.
by AndersM
Tue Sep 29, 2015 11:21 am
Forum: Automation, sensing and robotics
Topic: reading serial data from sensor
Replies: 11
Views: 2640

Re: reading serial data from sensor

Interesting! ... but a bit over my head :oops:
by AndersM
Sun Sep 27, 2015 5:01 pm
Forum: Automation, sensing and robotics
Topic: reading serial data from sensor
Replies: 11
Views: 2640

Re: reading serial data from sensor

The marker idea seems good for avoiding partial data loss due to input flush. But now I'm thinking of moving the serial input read to a separate thread so that this thread will be reading at least as fast as the tiny is writing. Then have the reading thread updating the input variable in the main pr...

Go to advanced search