Search found 5956 matches

by pythoncoder
Fri May 31, 2019 9:46 am
Forum: Pyboard D-series
Topic: EMMC Flash Mounting issues
Replies: 11
Views: 8347

Re: EMMC Flash Mounting issues

... 2. Copy and paste to main.py and reboot. ... The normal way to run external programs is to copy the file to flash memory. There is no need to reboot: you should be able to issue import mmc_format mmc_format.mmc_format() You only need to modify main.py if you want code to run automatically on bo...
by pythoncoder
Thu May 30, 2019 8:53 am
Forum: ESP32 boards
Topic: Network connect weird behavior?
Replies: 1
Views: 1678

ESPx chip characteristics

... The ESP-8266 persists WIFI Credentials even after being disconnected from power (non-volatile) and will auto connect on boot or any disconnect event. The ESP-32 does only persists WIFI Credentials while turned on and will attempt to auto connect if wifi disconnects on its own. When disconnected...
by pythoncoder
Thu May 30, 2019 8:47 am
Forum: ESP32 boards
Topic: Limitations of MicroPython with ESP32
Replies: 3
Views: 2426

Large projects on ESP32 with PSRAM

It would be interesting to hear from anyone with experience of large projects. Mine top out at about 4KLOC on a Pyboard 1.x (with use of frozen bytecode). This has 192KiB of RAM. Clearly an ESP32 with 4MiB of RAM could support much larger projects. Has anyone quantified this in practice?
by pythoncoder
Wed May 29, 2019 8:33 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 31312

Re: How to switch on a electric bulb with ESP8266 board?

Assuming you have the LED working as per the advice of @jimmo, you need something like from ntptime import settime import time import machine settime() rtc=machine.RTC() pin=machine.Pin(14,machine.Pin.OUT) led_on = False while True: t = rtc.datetime() if t[4] == 5 and not led_on: led_on = True pin.o...
by pythoncoder
Wed May 29, 2019 7:49 am
Forum: General Discussion and Questions
Topic: Serial - bit banging
Replies: 15
Views: 8817

Re: Serial - bit banging

A Pyboard (V1.1 or D series). Whether they meet your requirement for "as cheap as possible" is moot. I would strongly recommend uasyncio rather than threading for reasons covered in the tutorial in this repo . Writing a soft UART capable of handling two concurrent 19.2Kbaud streams would be a signif...
by pythoncoder
Wed May 29, 2019 7:32 am
Forum: Pyboard D-series
Topic: EMMC Flash Mounting issues
Replies: 11
Views: 8347

Re: EMMC Flash Mounting issues

Puzzling. You might try

Code: Select all

import os
mmc = pyb.MMCard()
mmc.power(1)
mmc.info()
os.mount(mmc, '/mmc')
This is based on looking at the mmc_format script - alas I don't have an MMC card to actually try this.
by pythoncoder
Wed May 29, 2019 6:56 am
Forum: General Discussion and Questions
Topic: Serial - bit banging
Replies: 15
Views: 8817

Re: Serial - bit banging

There is no official soft UART implementation. The best option is probably to use hardware which does support it, such as any Pyboard. A soft UART could be written but would probably be restricted to low baud rates because of ESP32 latency issues.
by pythoncoder
Tue May 28, 2019 10:33 am
Forum: Drivers for External Components
Topic: AMG8833 Thermal Imaging device driver
Replies: 2
Views: 2897

Re: AMG8833 Thermal Imaging device driver

This now includes optional modules for bicubic interpolation of the data: this improves the apparent resolution of the images, reducing the "blocky" effect of displaying data from the 8x8 sensor.
by pythoncoder
Tue May 28, 2019 10:25 am
Forum: MicroPython pyboard
Topic: Without delay(), how hard is it?
Replies: 7
Views: 8387

Re: Without delay(), how hard is it?

This approach is fine for very simple programs but the event loop soon gets convoluted as the number of events to be handled increases. You can write more modular and object oriented code using asyncio. Consider this code which flashes the four Pyboard LED's asynchronously for ten seconds: import py...
by pythoncoder
Tue May 28, 2019 9:14 am
Forum: General Discussion and Questions
Topic: IR encoder pyboard V1,1
Replies: 10
Views: 6925

Re: IR encoder pyboard V1,1

To use my encoder.py copy it to the Pyboard then issue: from machine import Pin import time import encoder x6 = Pin('X6', Pin.IN) x7 = Pin('X7', Pin.IN) enc = encoder.Encoder(x6, x7, False, 1.0) while True: print(enc.position) time.sleep(0.2) This will work if it's a quadrature encoder. But not othe...