Search found 19 matches

by randomhuman
Mon Jun 16, 2014 10:12 am
Forum: General Discussion and Questions
Topic: Problem with multiple ADCs
Replies: 3
Views: 2030

Problem with multiple ADCs

I'm having some problems with reading from multiple ADC pins. I have two potentiometers hooked up to X7 and X8, but one of the pots controls both readings, while the other one has no effect. Here's the code that I'm using for testing: from pyb import ADC import pyb if __name__ == "__main__": switch ...
by randomhuman
Sun Jun 15, 2014 4:14 pm
Forum: General Discussion and Questions
Topic: Working WS2812 LED Example
Replies: 11
Views: 10072

Re: Working WS2812 LED Example

It is possible to run the SPI bus at half the baud rate, as the Espruino example was doing. This requires only four bits to be sent per actual bit of color data, which should help with the memory requirements. This might not be the best way to do it, but what I have looks like this: from pyb import ...
by randomhuman
Sun Jun 15, 2014 1:18 pm
Forum: General Discussion and Questions
Topic: Working WS2812 LED Example
Replies: 11
Views: 10072

Re: Working WS2812 LED Example

Nice one, works well with Adafruit "Neopixels" as well, they use that same LED.
by randomhuman
Sun Jun 15, 2014 12:58 pm
Forum: Hardware Projects
Topic: Module for reading from MPL115A2 pressure sensor
Replies: 0
Views: 3156

Module for reading from MPL115A2 pressure sensor

I put together a module for reading from a Freescale MPL115A2 barometric pressure sensor: https://github.com/khoulihan/micropython-mpl115a2 Adafruit sell a breakout for this sensor, and the code owes a lot to their Arduino library: https://www.adafruit.com/products/992 https://github.com/adafruit/Ad...
by randomhuman
Sun Jun 15, 2014 11:55 am
Forum: Hardware Projects
Topic: Module for TMP102 temperature sensor
Replies: 16
Views: 10573

Re: Module for TMP102 temperature sensor

Thanks :) I did implement a lot more functionality than I needed myself - I only needed the shutdown/single conversion stuff, because my application will only need to take readings a few times an hour at most - but once I started it seemed rude not to do the rest! I don't think the code does anythin...
by randomhuman
Fri Jun 13, 2014 1:52 pm
Forum: General Discussion and Questions
Topic: Developping on pyboard
Replies: 6
Views: 3027

Re: Developping on pyboard

The same process works fine on Linux, and the filesystem remains mounted throughout. You only need to umount if you're doing a hard-reset.
by randomhuman
Thu Jun 12, 2014 3:37 pm
Forum: Hardware Projects
Topic: Module for TMP102 temperature sensor
Replies: 16
Views: 10573

Module for TMP102 temperature sensor

I've put together a module for configuring and reading from a Texas Instruments TMP102 temperature sensor over I2C: https://github.com/khoulihan/micropython-tmp102 I think the only feature that is not supported is the SMBus interrupts that can be enabled for when the temperature passes certain thres...
by randomhuman
Mon Jun 09, 2014 9:00 pm
Forum: Development of MicroPython
Topic: Append mode not supported for files
Replies: 2
Views: 2041

Re: Append mode not supported for files

Ok I've created a bug report as you suggested: https://github.com/micropython/micropython/issues/676

Thanks for the feedback.
by randomhuman
Mon Jun 09, 2014 2:01 pm
Forum: Development of MicroPython
Topic: Append mode not supported for files
Replies: 2
Views: 2041

Append mode not supported for files

It looks like append mode is not supported when opening files, I get this exception:

ValueError: invalid mode: 'a'

The code works fine if I use write mode, but obviously that clobbers the file, which is inconvenient. Is there a reason for this, or is it maybe an oversight?

--
Kevin