Search found 288 matches

by Turbinenreiter
Sat Oct 29, 2016 4:38 pm
Forum: ESP8266 boards
Topic: Working on a simple ADXL345 driver (i.e. two's complement)
Replies: 3
Views: 4831

Re: Working on a simple ADXL345 driver (i.e. two's complement)

# from stackoverflow J.F. Sebastian def _twos_comp(val, bits=8): """compute the 2's complement of int val with bits""" if (val & (1 << (bits - 1))) != 0: # if sign bit is set val = val - (1 << bits) # compute negative value return val # return positive value as is I stole this from Stackoverflow on...
by Turbinenreiter
Tue Oct 25, 2016 12:06 pm
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.Pin
Replies: 62
Views: 44651

Re: RFC: Hardware API: finalising machine.Pin

OK, so presumably there would be a 'lowest common denominator' core API which should be broadly portable (SPI, UART, I2C, Timers etc). Do you allow that to be extended via IFDEFs to cope with chip specific functions (CAN, BT, WiFi, FPU etc.) or split those off as independently loadable modules? If ...
by Turbinenreiter
Tue Oct 25, 2016 8:52 am
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.Pin
Replies: 62
Views: 44651

Re: RFC: Hardware API: finalising machine.Pin

I think it makes a lot of sense to ship the drivers for all the hardware present on the official boards -- such as LEDs, buttons, accelerometer, hobby servo connectors, etc. However, I feel they should not go in the "machine" module, but rather in a separate module, specific to the board, such as "...
by Turbinenreiter
Mon Oct 24, 2016 8:44 pm
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.Pin
Replies: 62
Views: 44651

Re: RFC: Hardware API: finalising machine.Pin

How many ESP8622 apps run on a pyboard? My guess would be next to none because if it was implemented on an ESP8622 it probably has a hard dependency on networking. Don't think about apps, think about drivers. When I implement a module for i.e. a sensor I want that to be usable to people across all ...
by Turbinenreiter
Mon Oct 24, 2016 5:34 pm
Forum: ESP8266 boards
Topic: MPU-6050 on Wemos D1 mini (I2C)
Replies: 16
Views: 19167

Re: MPU-6050 on Wemos D1 mini (I2C)

This should work with the MPU6050. The base class in imu.py is pretty much the driver for the MPU6050.
by Turbinenreiter
Mon Oct 24, 2016 4:00 pm
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.Pin
Replies: 62
Views: 44651

Re: RFC: Hardware API: finalising machine.Pin

Three pages of discussion for one simple flag - API design is _hard_ :shock: :D
by Turbinenreiter
Mon Oct 24, 2016 2:00 pm
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.Pin
Replies: 62
Views: 44651

Re: RFC: Hardware API: finalising machine.Pin

Trying to conclude on inverting Pins: @deshipu: -1 @pfalcon: +0 @marfis: -1 @chrismas9: -1 Pro: you can simply invert a Pin when porting from one board to another where i.e. a LED is pulled up or down Con: it's not actually a function that the Hardware has Way I see it: machine implements the Hardwa...
by Turbinenreiter
Fri Oct 21, 2016 5:48 pm
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.I2C
Replies: 36
Views: 26899

Re: RFC: Hardware API: finalising machine.I2C

I like it, but it would also be the third time I'll have to update every driver I wrote with a new API. We gotta make this one stick. I don't mean to make things difficult for users, but the way it is currently is not very consistent across ports. Ideally we would make little to no change to the ex...
by Turbinenreiter
Fri Oct 21, 2016 8:13 am
Forum: Development of MicroPython
Topic: RFC: Hardware API: finalising machine.I2C
Replies: 36
Views: 26899

Re: RFC: Hardware API: finalising machine.I2C

So ep.reg_write() would replace I2C.readfrom_mem() ? And the class for the I2C device would inherit from I2CEndpoint? Reading and writing bytes definitely should be able to do multiple bytes. It's quite common to have to read two bytes from two successive registers sensors. I.e. this: MSB, LSB = ep....
by Turbinenreiter
Mon Oct 17, 2016 10:12 am
Forum: WiPy and CC3200 boards
Topic: NEW: WiPy 2.0 - shipping 10 Oct 2016
Replies: 62
Views: 77590

Re: NEW: WiPy 2.0 - shipping 10 Oct 2016

Adafruit is working on an ESP32 Feather and that form factor is just incredibly good. Given their work on porting to atsamd21 I'd reckon they will be interested in an ESP32 port, too.