Search found 5956 matches

by pythoncoder
Sun Mar 18, 2018 1:35 pm
Forum: General Discussion and Questions
Topic: reconnecting to boards running endless loops
Replies: 2
Views: 3608

How to detect USB connected status on ESPx?

As you've discovered in deep sleep USB is turned off to save power. The way I deal with this on the Pyboard is, when my application starts, to detect whether USB is connected. If it is, I don't go into deep sleep. This facilitates debugging while enabling it to run normally when you start it without...
by pythoncoder
Sat Mar 17, 2018 6:43 am
Forum: General Discussion and Questions
Topic: Graphic Interface for application developed in Micropython
Replies: 3
Views: 2434

Re: Graphic Interface for application developed in Micropython

This depends on the graphics hardware. I would consider SSD1306 OLED displays which are officially supported. See the driver code . Libraries like Qt are far too large to port to microcontrollers, especially the ESP8266. There are full touch GUI solutions for the Pyboard but I don't think there are ...
by pythoncoder
Sat Mar 17, 2018 6:36 am
Forum: Drivers for External Components
Topic: SSD1306 and frozen micropython uc
Replies: 5
Views: 3689

Re: SSD1306 and frozen micropython uc

Unless you have access to the MicroPython sourcecode for your platform and have the tools to rebuild and deploy it I'm afraid your options are extremely limited.

If you can successfully build and deploy the code, then I'm sure we can advise on how to include the official framebuf module.
by pythoncoder
Sat Mar 17, 2018 6:30 am
Forum: ESP8266 boards
Topic: Using the analog pin to control a relay?
Replies: 6
Views: 3804

Re: Using the analog pin to control a relay?

Fair point, although a pair of resistors should be used to limit the digital signal to the 0-1V that the ADC can accept.
by pythoncoder
Sat Mar 17, 2018 6:20 am
Forum: ESP8266 boards
Topic: Using the analog pin to control a relay?
Replies: 6
Views: 3804

Re: Using the analog pin to control a relay?

@Roberthh I think you may have misunderstood the original post. @digicosmos wants to re-purpose the pin as a digital output. I believe @deshipu is correct in his comment and that it's a limitation of the hardware rather than of MicroPython.
by pythoncoder
Sat Mar 17, 2018 6:14 am
Forum: General Discussion and Questions
Topic: accelerometer with intensity
Replies: 3
Views: 2368

Re: accelerometer with intensity

You successfully coded the first example, so I'm sure you could adapt it to do what you want. Read the x value and multiply it by a factor for the sensitivity you need. Then limit the result to constrain it to 0 <= result <= 255 and set the intensity accordingly.
by pythoncoder
Sat Mar 17, 2018 6:08 am
Forum: ESP8266 boards
Topic: Software serial?
Replies: 57
Views: 74316

Re: Software serial?

A full duplex software UART is quite hard to do, especially if all the features of a hardware UART are to be emulated. Further the Pyboard has five user-accessible hardware UARTs so use-cases on that platform will be few. The main use-cases are on Espressif devices, especially the ESP8266 which has ...
by pythoncoder
Sat Mar 17, 2018 5:48 am
Forum: MicroPython pyboard
Topic: machine.idle() during await uasyncio.sleep()?
Replies: 6
Views: 4643

Re: machine.idle() during await uasyncio.sleep()?

The builds on the download page marked (latest) are daily builds so should work fine.
by pythoncoder
Fri Mar 16, 2018 9:12 am
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17166

Re: Freezing code and modules

This has caused confusion before. It's not obvious how an emit=native option could possibly work without a means of specifying the target architecture/instruction set. In practice, as far as I'm aware, it doesn't work and @Roberthh's post is correct.
by pythoncoder
Fri Mar 16, 2018 9:05 am
Forum: Drivers for External Components
Topic: SSD1306 and frozen micropython uc
Replies: 5
Views: 3689

Re: SSD1306 and frozen micropython uc

It looks like the developers who ported MicroPython to that platform have chosen to omit the framebuf module, perhaps to save RAM. It is available by default on the Pyboard and ESP8266.