Search found 2090 matches

by dhylands
Sun Jan 15, 2017 6:59 pm
Forum: General Discussion and Questions
Topic: Datalogging RH from Si7021, can't get my code to work
Replies: 1
Views: 21

Re: Datalogging RH from Si7021, can't get my code to work

What I normally do is to put my code in a file, say rshlog.py and make sure I can do:

Code: Select all

import rshlog
from the REPL and not get any errors.

Then I just add the import rshlog line to main.py. You're much less likely to make an error adding an import statement than adding a bunch of code.
by dhylands
Sun Jan 15, 2017 6:52 pm
Forum: Programs, Libraries and Tools
Topic: Can I use Commpy library in micropython?
Replies: 2
Views: 35

Re: Can I use Commpy library in micropython?

Do you have a link to the compy library?

You can also use serial, and CAN., I use a half-duplex serial that allows multiple devices to sit on a single wire bus.
by dhylands
Sun Jan 15, 2017 4:18 am
Forum: General Discussion and Questions
Topic: Filesystem and write durability
Replies: 2
Views: 60

Re: Filesystem and write durability

The internal flash is even worst. The filesystem may write 512 byte blocks, but you actually need to erase an entire sector (16K - 64K on th F series, 2K on the L series). If you wrote to flash directly, (i.e. not using a filesystem), then you can write individual bytes at a time. Well you erase a b...
by dhylands
Sat Jan 14, 2017 6:58 pm
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 17
Views: 345

Re: LCD 1602 - Library

ZKDMun wrote:i2c.scan() delivers me a list of the values 8 to 119...

>>>i2c.scan()
[8,9,10,11,12,13,14,15,16 - and so on - 117,118,119]

Seeing this suggests that the pullup resistors aren't wired in properly.
by dhylands
Sat Jan 14, 2017 12:09 am
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 17
Views: 345

Re: LCD 1602 - Library

Normally, if you do a scan of the i2c bus it will return all of the detected devices. Did you add pullups on the SDA and SCL lines? I2C requires them. The PCF8574 I2C chip on the backpack has 3 address lines called A0, A1, A2. How those are wired up determines the lest significant 3 bits of the I2C ...
by dhylands
Fri Jan 13, 2017 9:34 pm
Forum: General Discussion and Questions
Topic: Calculating with high precicion
Replies: 6
Views: 120

Re: Calculating with high precicion

32 bit floats consist of 24-bits of mantissa (only 23 bits are stored), 1 bit sign and 8 bits of exponent. 24 bits can store about 6 significant digits (base 10). So when you do: 77.04876/360 you'll get 0.2140244 When you then add 2451545 you're essentially throwing away your first result since 2451...
by dhylands
Fri Jan 13, 2017 8:40 pm
Forum: Other Boards
Topic: Teensy 3.5/3.6
Replies: 7
Views: 775

Re: Teensy 3.5/3.6

The REPL I/O winds up funneling through the functions in teensy_hal.c https://github.com/dhylands/micropython/blob/teensy-usb/teensy/teensy_hal.c I haven't yet added compile time options to put the REPL on a UART, but you can do it using the following in boot.py (this I have tested): import machine ...
by dhylands
Fri Jan 13, 2017 5:42 pm
Forum: General Discussion and Questions
Topic: Calculating with high precicion
Replies: 6
Views: 120

Re: Calculating with high precicion

On MicroPython, floating point numbers are only 32-bit floats. On regular python, they're 64-bit.

Integers can be arbitrarily large.
by dhylands
Fri Jan 13, 2017 3:23 am
Forum: Other Boards
Topic: Porting Kinetis MK64F
Replies: 32
Views: 3423

Re: Porting Kinetis MK64F

Hi Neil, I have MicroPython running on the Teensy 3.5/3.6. See this thread: forum.micropython.org/viewtopic.php?f=12&t=2274&p=16928 I haven't done usb host stuff, so that would be interesting. I've got the following working: GPIO, ADC, timers, sdcard, usb-serial, UARTs. I'm part way through ...
by dhylands
Thu Jan 12, 2017 5:48 pm
Forum: General Discussion and Questions
Topic: OSError: accelerometer not found
Replies: 1
Views: 34

Re: OSError: accelerometer not found

Which board are you using?

Go to advanced search