Search found 18 matches
- Fri Jul 04, 2014 7:18 am
- Forum: Hardware Projects
- Topic: Library for HC-SR04 and SRF04 ultrasonic sensors
- Replies: 2
- Views: 12345
Library for HC-SR04 and SRF04 ultrasonic sensors
Hi all! Now I've received my ultrasonic sensors (the previous one died, so I orderer two new) I tested my lib for it :) So here it is if anyone is interested on it: https://github.com/skgsergio/MicropythonLibs/blob/master/Ultrasonic/ultrasonic.py At the moment it only allows one sensor but I plan to...
- Mon Jun 16, 2014 3:47 pm
- Forum: MicroPython pyboard
- Topic: Question about 5V tolerant pins.
- Replies: 5
- Views: 10642
Question about 5V tolerant pins.
Hi, I'm using a ultrasonic sensor that gives back a 5V pulse. In other micro controllers that don't allow 5V I use a 1k resistor so I went to the Pyboard schematics and I found this: "All pins are 5V tolerant except PA4 & PA5" (and those are X5 and X6). So as far as I understand there is no need of ...
- Fri May 16, 2014 8:39 am
- Forum: MicroPython pyboard
- Topic: start code from uSD?
- Replies: 2
- Views: 4925
Re: start code from uSD?
If you have a SD card in the slot the board will start from it like it was the internal memory. That is it will run boot.py from the SD card when it start or get reseted.
- Wed May 14, 2014 10:29 pm
- Forum: General Discussion and Questions
- Topic: Pulse width in microseconds (like pulseIn in Arduino)
- Replies: 9
- Views: 24609
Re: Pulse width in microseconds (like pulseIn in Arduino)
Well, seems my sensor is dead :( It has been stored a years or so in a not proper place and broke. Is not working with nor Arduino neither RPi so I can't test the code until I get a new one :( import pyb triggerPin = pyb.Pin.board.X3 echoPin = pyb.Pin.board.X4 trigger = pyb.Pin(triggerPin) trigger.i...
- Wed May 14, 2014 8:04 pm
- Forum: MicroPython pyboard
- Topic: Compiling firmware with Linaro slightly improves performance
- Replies: 2
- Views: 5492
Re: Compiling firmware with Linaro slightly improves perform
Seems that v1.0.1 runs a little bit faster, here the results with the same test:
GNU GCC 4.8: 2176580
Linaro GCC 4.8 2014.01: 2236090
GNU GCC 4.8: 2176580
Linaro GCC 4.8 2014.01: 2236090
- Wed May 14, 2014 2:32 pm
- Forum: General Discussion and Questions
- Topic: Pulse width in microseconds (like pulseIn in Arduino)
- Replies: 9
- Views: 24609
Re: Pulse width in microseconds (like pulseIn in Arduino)
I use it too in the RPi :) Sure this code sounds you like the first I posted: import time import RPi.GPIO as GPIO SRF04_TRIGGER = 14 SRF04_ECHO = 15 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) def getDist(): GPIO.setup(SRF04_TRIGGER, GPIO.OUT) GPIO.setup(SRF04_ECHO, GPIO.IN) GPIO.output(SRF04_TRI...
- Wed May 14, 2014 1:38 pm
- Forum: General Discussion and Questions
- Topic: Pulse width in microseconds (like pulseIn in Arduino)
- Replies: 9
- Views: 24609
Re: Pulse width in microseconds (like pulseIn in Arduino)
Awww! Thanks, I didn't though about Timer for implementing the microseconds counter! (I was right I was missing something ).
About the ExtInt I've already thought about it but I wanted to get a simple test working first. It's sure more accurate that method than the while: contine.
About the ExtInt I've already thought about it but I wanted to get a simple test working first. It's sure more accurate that method than the while: contine.
- Wed May 14, 2014 9:36 am
- Forum: General Discussion and Questions
- Topic: Pulse width in microseconds (like pulseIn in Arduino)
- Replies: 9
- Views: 24609
Pulse width in microseconds (like pulseIn in Arduino)
Hi all, I'm making a library for SRF04/HC-SR04 I'm missing something (maybe it's there but somehow I can't find it). This ultrasonic sensor that works as follows (most works like this, indeed): http://i.imgur.com/64qPJn1.jpg In Arduino you typically do: digitalWrite(triggerPin, HIGH); delayMicroseco...
- Tue May 13, 2014 6:02 pm
- Forum: General Discussion and Questions
- Topic: Interesting issue with different sdcards
- Replies: 17
- Views: 17819
Re: Interesting issue with different sdcards
Well I tested two MicroSD cards, one of 4GB and another of 16GB. When I connect the pyboard with them (both are FAT32) at first my system says that its size is 3GB but it gets updated immediately and the real size is shown in the preferences and in the console. But my desktop env (GNOME Shell) still...
- Tue May 13, 2014 5:11 pm
- Forum: MicroPython pyboard
- Topic: Compiling firmware with Linaro slightly improves performance
- Replies: 2
- Views: 5492
Compiling firmware with Linaro slightly improves performance
There was one thing in my mind that I wanted to do as soon as I get my pyboard and that was check if Linaro GCC increase the performance. I used as abase the "benchmark" that is in the wiki: https://github.com/micropython/micropython/wiki/Performance I put the following code in boot.py and then via ...