Search found 16 matches

by pmulvey
Sun May 12, 2019 1:14 pm
Forum: ESP8266 boards
Topic: Variable read times for BME280
Replies: 0
Views: 136

Variable read times for BME280

I am using the bme280_float library. The bme280.altitude property sometimes takes different times to complete and it seems random (8 - 80mS). Anyone notice this before? while True: a = ticks_ms() print ((accelerometer.get_values()['AcX']) / 4096) print (ticks_ms() - a) print (bme280.altitude) print ...
by pmulvey
Sat May 11, 2019 7:41 pm
Forum: ESP8266 boards
Topic: Unable to write to MPU6050 Register 0x1C
Replies: 2
Views: 150

Re: Unable to write to MPU6050 Register 0x1C

Robert,

That works. I'm relatively new to micropython and am inclined to do too much copy and paste rather than being systematic about learning all aspects of the language. This is a good example of that. Thank you for your guidance.
by pmulvey
Sat May 11, 2019 4:41 pm
Forum: ESP8266 boards
Topic: Unable to write to MPU6050 Register 0x1C
Replies: 2
Views: 150

Unable to write to MPU6050 Register 0x1C

I am trying to change the range on the accelerometer. This is done by setting bits in 0x1C. I modified the class accel() and added this piece of code. I had the register lines in the __init__ part initially and just moved it here for further debugging. The print statement always returns zero. def ge...
by pmulvey
Sat Apr 13, 2019 12:47 pm
Forum: General Discussion and Questions
Topic: Other Micropython forums
Replies: 3
Views: 316

Other Micropython forums

At the risk of insulting someone here I'm surprised at the low level of activity on this forum in general. Indeed searching for other micropython forums reveals little or none out there. Considering the vastness of the web and the application of micropython coupled with the cheap and cheerful ESP ra...
by pmulvey
Thu Apr 04, 2019 9:32 pm
Forum: ESP8266 boards
Topic: New script downloaded to board but old one still runs
Replies: 1
Views: 181

New script downloaded to board but old one still runs

I had a problem with the "MemoryError: memory allocation failed" error. I was using the __init__.py structure. After trying to remove offending code from my library module (~10k) for days the problem persisted. Finally I split the module into two 5k modules and the situation resolved itself. Now I h...
by pmulvey
Thu Aug 16, 2018 11:08 am
Forum: ESP8266 boards
Topic: IR 38Khz frequency out
Replies: 6
Views: 711

Re: IR 38Khz frequency out

Has anyone implemented this method in micropython?
by pmulvey
Wed Aug 15, 2018 9:05 am
Forum: ESP8266 boards
Topic: IR 38Khz frequency out
Replies: 6
Views: 711

IR 38Khz frequency out

The Arduino (ATMega 328) has a timer register that can be preloaded and set to pulse an I/O pin on overflow so that a 38KHz output waveform is generated outside of program control. Has the ESP8266 anything like this? Bit banging with micropython is not fast enough I'm sure.
by pmulvey
Tue Aug 14, 2018 6:36 pm
Forum: ESP8266 boards
Topic: Something going on in background??
Replies: 6
Views: 580

Re: Something going on in background??

Just tried using 4KHz PWM frequency and the flickering is just more frequent.
by pmulvey
Mon Aug 13, 2018 11:42 am
Forum: ESP8266 boards
Topic: Something going on in background??
Replies: 6
Views: 580

Re: Something going on in background??

I realise that it might not matter in most situations except if you created a mood light with it. Instead of calming you down it would probably drive you crazy!
by pmulvey
Mon Aug 13, 2018 11:31 am
Forum: ESP8266 boards
Topic: DS18B20 code to set Resolution and return Temperature
Replies: 0
Views: 345

DS18B20 code to set Resolution and return Temperature

I have rejigged Arduino and micropython code to produce a Function that returns the temperature with input parameters of Pin No and Resolution (9-12 bits). def Temperature(resolution, dsPin): dat = machine.Pin(dsPin) ds = DS18X20(onewire.OneWire(dat)) roms = ds.scan() for rom in roms: if resolution ...