Search found 3408 matches

by pythoncoder
Mon Jun 17, 2019 8:53 am
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 11
Views: 157

Re: Call method and passed as a parameter

jimmo wrote:
Sun Jun 16, 2019 5:47 pm
...
When you past code into the forum, select it and then press the </> button so the formatting is preserved.
When someone omits to do this (or can't because they are a new forum user) you can see the formatting by pressing the quote button. A tip someone gave me a while ago.
by pythoncoder
Mon Jun 17, 2019 8:45 am
Forum: General Discussion and Questions
Topic: Arbitrary precision LibBF library port to MicroPython
Replies: 3
Views: 98

Re: Arbitrary precision LibBF library port to MicroPython

Interesting. I have a lunar clock which I built many years ago. It has a servo-driven pointer indicating the lunar phase. It can display and predict sun and moon rise and set times and lunar quarters. It uses double precision FP (in C). Note that the Pyboard D SF6W supports DP in hardware. Other por...
by pythoncoder
Mon Jun 17, 2019 8:15 am
Forum: Hardware Projects
Topic: Thermal imaging camera (Pyboard D based)
Replies: 2
Views: 57

Re: Thermal imaging camera (Pyboard D based)

Adafruit have an amazing video which brings out more detail than my bicubic interpolation (scroll down the page to see it). They achieve this using heavy-duty software running on a Raspberry Pi. I don't believe this combination of image processing and frame rate is achievable on a Pyboard. The bicub...
by pythoncoder
Mon Jun 17, 2019 8:07 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 36
Views: 951

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

I'm not sure what you're asking. That code would work on an ESP8266. If you're planning to use that technique to set the RTC manually you could input a time/date string but you'd need to parse it in code and do some validation. In considering ways to compensate for RTC drift you need to consider the...
by pythoncoder
Sun Jun 16, 2019 5:37 pm
Forum: Hardware Projects
Topic: Thermal imaging camera (Pyboard D based)
Replies: 2
Views: 57

Thermal imaging camera (Pyboard D based)

This uses the Adafruit AMG8833 sensor with their 1.5 inch OLED display . The AMG8833 device driver is here . The display is mounted on a custom PCB with the Pyboard D SF2W in a WBUS-DIP28 adaptor on the rear. The WBUS-DIP28 could be dispensed with and connections made to the D pins, except that I am...
by pythoncoder
Sun Jun 16, 2019 8:32 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 36
Views: 951

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

@RajaRamesh The ntptime module is merely used to initialise the RTC. If you have an internet connection it's the obvious way to do it, but you can set it by any means you wish. Note that the RTC on the ESP8266 is not very accurate and it may need setting at regular intervals.
by pythoncoder
Sun Jun 16, 2019 7:48 am
Forum: General Discussion and Questions
Topic: Arbitrary precision LibBF library port to MicroPython
Replies: 3
Views: 98

Re: Arbitrary precision LibBF library port to MicroPython

Impressive! Out of interest can you envisage applications for running this on microcontrollers?
by pythoncoder
Sun Jun 16, 2019 7:13 am
Forum: MicroPython pyboard
Topic: Import Pyserial Module
Replies: 10
Views: 238

Re: Import Pyserial Module

A good way to handle concurrency is to use uasyncio . The following demo can be pasted into your Pyboard REPL: import uasyncio as asyncio from pyb import USB_VCP uart = USB_VCP() swriter = asyncio.StreamWriter(uart, {}) sreader = asyncio.StreamReader(uart) async def sender(): while True: await swrit...
by pythoncoder
Wed Jun 12, 2019 4:45 pm
Forum: ESP32 boards
Topic: external interrupts consideration
Replies: 3
Views: 107

Re: external interrupts consideration

According to my docs for the reference board (ESP32-devkit-C) the two input-only pins associated with ADC1 are GPIO34 and GPIO35. There is no 38 or 39. What board are you using?

I assume you've ensured that the logic 1 level is <=3.3V.
by pythoncoder
Sun Jun 09, 2019 5:42 pm
Forum: MicroPython pyboard
Topic: Import Pyserial Module
Replies: 10
Views: 238

Re: Import Pyserial Module

You can use pyserial on the Raspberry Pi and use the Pyboard UART as per the doc references @jimmo gave you.