Search found 13 matches

by hansel
Mon May 25, 2015 3:55 pm
Forum: Hardware Projects
Topic: Inertial measurement unit sensor fusion
Replies: 3
Views: 5845

Re: Inertial measurement unit sensor fusion

Hello Pythoncoder, Great work! What you did was on my long term todo list... :-) I ran your class in a 'quick and dirty' way on my Pyboard with a sensor board called GY-88 which has a MPU6050 and a HMC5883. I ran the update function without calibrating first and I get meaningful stable values. I hav...
by hansel
Wed Apr 08, 2015 7:06 pm
Forum: General Discussion and Questions
Topic: Basic question, pin vs port?
Replies: 4
Views: 3888

Re: Basic question, pin vs port?

Damien gave an example a while ago to read 8 pins at once by reading a hardware register
http://forum.micropython.org/viewtopic.php?f=2&t=557 (4th post)

There probably is a similar register for writing?
by hansel
Tue Apr 07, 2015 8:33 pm
Forum: Hardware Projects
Topic: Driver for LCD display Nokia 5110
Replies: 18
Views: 25277

Re: Driver for LCD display Nokia 5110

I came across this thread, maybe the link below can help somebody... I've no time soon to look into this myself but I found sample code to control this display over SPI. Maybe it can be ported to Python? The display is indeed nice and cheap! (I've used in in and Arduino project) page: https://www.ol...
by hansel
Mon Mar 16, 2015 7:34 am
Forum: General Discussion and Questions
Topic: Logging ADC data to SD-card
Replies: 9
Views: 12726

Re: Logging ADC data to SD-card

It would be interesting to read (and timestamp) the ADC in a timer callback...
by hansel
Sun Mar 01, 2015 12:36 pm
Forum: General Discussion and Questions
Topic: LCD connected check
Replies: 6
Views: 5642

Re: LCD connected check

Just guessing here... maybe the lcd module is not ready yet? You could try a small delay at the start of the script...
by hansel
Tue Feb 24, 2015 6:24 pm
Forum: General Discussion and Questions
Topic: How fast can 16 input pins be read in sequence?
Replies: 6
Views: 7436

Re: How fast can 16 input pins be read in sequence?

Just did a small test: reading 8 bit samples into an array runs at 47 Khz. A bit slow for a logic analyzer... Maybe a small assembler loop could bring this to 10 or 20 MHz? ;) N=1000.0 a=array.array('B') start = pyb.micros() for i in range(N): a.append(stm.mem32[stm.GPIOA + stm.GPIO_IDR]) dt = pyb.m...
by hansel
Sat Feb 21, 2015 10:12 pm
Forum: General Discussion and Questions
Topic: How fast can 16 input pins be read in sequence?
Replies: 6
Views: 7436

Re: How fast can 16 input pins be read in sequence?

I experimented with timer callback at 10Khz (= 100 us), but I'm not sure how much I/O you can put in it...
by hansel
Sat Feb 21, 2015 3:09 pm
Forum: Hardware Projects
Topic: IR trigger for Sony Nex cameras
Replies: 0
Views: 2972

IR trigger for Sony Nex cameras

The attached script triggers a Sony NEX camera every 5 seconds by sending the appropriate pulses to an IR LED connected to pin X2. This will be part of a larger project (remotely controlled camera rig). I post this 'snippet' her in case somebody would need something similar. It can be adapted easily...
by hansel
Sat Feb 21, 2015 11:11 am
Forum: General Discussion and Questions
Topic: How to modify an external interrupt?
Replies: 1
Views: 2161

How to modify an external interrupt?

Is there a way to modify an external interrupt (say map to a different callback)? ExtInt has no deinit(), and when calling the constructor again for the same pin one gets an exception: ExtInt vector 1 is already in use def callback1(line): print ("cb 1") def callback2(line): print ("cb 2") pin = pyb...
by hansel
Fri Feb 13, 2015 2:15 pm
Forum: General Discussion and Questions
Topic: max reasonable timer callback frequency?
Replies: 10
Views: 8513

Re: max reasonable timer callback frequency?

I tried the 'modulated time' example. It works, thanks again! I believe decoding and encoding IR signals is feasible. I tested the example with a spare Arduino programmed as 'logic analyzer' with OLS. (unreliable and uncomfortable but cheap setup) I've done IR stuff with Arduinos: quite easy with th...