## Search found 288 matches

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: 12922

### 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...
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: 12922

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

... yeah.

Mixed up my hex and my binary tables.

this is it:
4096 256 16 1
1 b 1 b
1x4096 + 11*256 + 1*16 + 1*11 = 6939
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: 12922

### 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?
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: 12922

### 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...
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: 12922

### 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...
Fri May 16, 2014 9:33 am
Forum: General Discussion and Questions
Replies: 0
Views: 1518

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?

If you want anything changed or added, just let me know.
Sun May 04, 2014 5:18 pm
Forum: MicroPython pyboard
Topic: Logging data to file on SD-card
Replies: 5
Views: 9704

### Re: Logging data to file on SD-card

Sun May 04, 2014 8:58 am
Forum: MicroPython pyboard
Topic: Logging data to file on SD-card
Replies: 5
Views: 9704

### 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...