Search found 288 matches

by Turbinenreiter
Wed Jul 02, 2014 12:51 pm
Forum: General Discussion and Questions
Topic: development of a module for the bmp180 pressure sensor
Replies: 24
Views: 26676

Re: I2C, MSB, LSB, endianness and I'm in over my head

[I will repurpose this thread as 'BMP180 module development'] @dhylands: I'm quite sure it's from the rigth location. Reading 0xD0 also gives me the correct chip-id of 0x55 (altough it was printed out as b'U' - which took me a while to figure out^^) I now have a (rough) implementation of a class for...
by Turbinenreiter
Tue Jul 01, 2014 7:09 pm
Forum: General Discussion and Questions
Topic: development of a module for the bmp180 pressure sensor
Replies: 24
Views: 26676

Re: I2C, MSB, LSB, endianness and I'm in over my head

... yeah.

Mixed up my hex and my binary tables.

head = spinning

this is it:
4096 256 16 1
1 b 1 b
1x4096 + 11*256 + 1*16 + 1*11 = 6939
by Turbinenreiter
Tue Jul 01, 2014 6:48 pm
Forum: General Discussion and Questions
Topic: development of a module for the bmp180 pressure sensor
Replies: 24
Views: 26676

Re: I2C, MSB, LSB, endianness and I'm in over my head

Thin I got it.

(MSB -> hex to int) * 256 + (LSB -> hex to int)

b'\x1b\x1b'
\x1b -> 27
27 * 256 + 27 = 6939

... but why 256?
by Turbinenreiter
Tue Jul 01, 2014 6:39 pm
Forum: General Discussion and Questions
Topic: development of a module for the bmp180 pressure sensor
Replies: 24
Views: 26676

Re: I2C, MSB, LSB, endianness and I'm in over my head

Thanks a lot for the examples! So struct.unpack needs to be passed a string (b'' > bytestring?) with two Bytes in it. I somehow treated it as function that converts hex to int. Could you explain the math behind '0x1b1b is equal to 6939'? When I take 0x1b1b as a hex, I would expect 443. 64 32 16 1 (e...
by Turbinenreiter
Tue Jul 01, 2014 9:48 am
Forum: General Discussion and Questions
Topic: development of a module for the bmp180 pressure sensor
Replies: 24
Views: 26676

development of a module for the bmp180 pressure sensor

[This is not a micropython speficic question, but a general one.] So, I'm trying to write a module for the BMP180. It's connected via i2c and I figured that out already, I think. However, I have to read some values from the sensors EEPROM for calibration, and I can't figure out how to get integers f...
by Turbinenreiter
Fri May 16, 2014 9:33 am
Forum: General Discussion and Questions
Topic: Google+ community
Replies: 0
Views: 3327

Google+ community

I created (is that the right term?) a Micropython community at Google+.
I stole the Logo and the short description form micropython.org - I assume that's OK?

https://plus.google.com/u/0/communities ... 3983441580

If you want anything changed or added, just let me know.
by Turbinenreiter
Sun May 04, 2014 8:58 am
Forum: MicroPython pyboard
Topic: Logging data to file on SD-card
Replies: 5
Views: 18088

Logging data to file on SD-card

... is not working? i tried this example: https://github.com/micropython/micropython/blob/master/examples/accellog.py obviously some stuff has changed (time, accel), and i fixed that, so now it looks like that: import pyb accel = pyb.Accel() f = open('motion.dat', 'w') # open the file for writing fo...