Search found 58 matches

by OlivierLenoir
Tue Apr 13, 2021 10:27 am
Forum: Programs, Libraries and Tools
Topic: Porting Libraries important for Machine Learning to Micropython
Replies: 4
Views: 263

Re: Porting Libraries important for Machine Learning to Micropython

You can look here, it's a project about Neural Network for MicroPython.
by OlivierLenoir
Thu Apr 08, 2021 7:36 am
Forum: ESP32 boards
Topic: Is it possible to disable ADC?
Replies: 3
Views: 188

Re: Is it possible to disable ADC?

Did you try to deinit ADC and Pin?

Code: Select all

from machine import ADC

pin_adc = Pin(32)
adc = ADC(pin_adc)

# your code

adc.deinit()
pin_adc.deinit()
or maybe this method:

Code: Select all

from machine import ADC

adc = ADC(Pin(32))

# your code

adc.deinit()
by OlivierLenoir
Tue Apr 06, 2021 3:44 pm
Forum: General Discussion and Questions
Topic: suggest best resources to learn python
Replies: 3
Views: 168

Re: suggest best resources to learn python

To learn Python, you can start by How to Think Like a ComputerScientist: Learning with Python 3DocumentationRelease 3rd Edition.
I also read O'Reilly book's Learning Python, Programming Python and Programming with MicroPython.
by OlivierLenoir
Sat Mar 20, 2021 12:35 pm
Forum: Programs, Libraries and Tools
Topic: Simple SPI example, please
Replies: 4
Views: 383

Re: Simple SPI example, please

Pulse view.
Screenshot at 2021-03-20 13-25-18.png
Screenshot at 2021-03-20 13-25-18.png (32.72 KiB) Viewed 303 times
by OlivierLenoir
Sat Mar 20, 2021 12:34 pm
Forum: Programs, Libraries and Tools
Topic: [Solved] Multiple potentiometers problem (ESP32)
Replies: 9
Views: 468

Re: Multiple potentiometers problem (ESP32)

There is a small mistake on you code. You forget to declare the ADC pin. You should do this one. from machine import Pin from machine import ADC from time import sleep def read_adc(adc_pin, sample=24): cumul = 0 for _ in range(sample): cumul += acd_pin.read() return cumul // sample # default 24 samp...
by OlivierLenoir
Sat Mar 20, 2021 9:35 am
Forum: Programs, Libraries and Tools
Topic: Simple SPI example, please
Replies: 4
Views: 383

Re: Simple SPI example, please

Full SN74HCS264 project is available here.
Here a test.

Code: Select all

from sn74hcs264 import SN74HCS264
from machine import Pin


a = Pin(2, Pin.OUT)
b = Pin(4, Pin.OUT)
clk = Pin(16, Pin.OUT)
clr = Pin(17, Pin.OUT)

register = SN74HCS264(a, b, clk, clr)

register.write(37)
register.clear()
by OlivierLenoir
Sat Mar 20, 2021 9:02 am
Forum: Programs, Libraries and Tools
Topic: Simple SPI example, please
Replies: 4
Views: 383

Re: Simple SPI example, please

It a draft and under development version a driver for SN74HCS264 . # Author: Olivier Lenoir - olivier.len02@gmail.com # Created: 2021-03-20 10:00:08 # License: MIT, Copyright (c) 2021 Olivier Lenoir # Language: MicroPython v1.14 # Project: SN74HCS264 # Description: MicroPython Driver for SN74HCS264 ...
by OlivierLenoir
Sat Mar 20, 2021 7:30 am
Forum: Programs, Libraries and Tools
Topic: [Solved] Multiple potentiometers problem (ESP32)
Replies: 9
Views: 468

Re: Multiple potentiometers problem (ESP32)

If you refer to this document, you can improve reading by adding 0.1µF capacitor and / or sampling the ADC reading. A code to sample the ADC reading. from machine import Pin from machine import ADC def read_adc(adc_pin, sample=24): cumul = 0 for _ in range(sample): cumul += acd_pin.read() return cum...
by OlivierLenoir
Fri Mar 19, 2021 8:08 pm
Forum: ESP32 boards
Topic: Chinese enhanced firmware for framebuf components
Replies: 10
Views: 665

Re: Chinese enhanced firmware for framebuf components

My Chinese in very poor (around ten words) and as Google seem to be a lot better than me, here is the translation. 按照你的说明,首先替换了你提供的modframebuf.c(git 连接下载) 修改了stream.c stream.h你说的相关内容,目前我是用的stm32 1.14环境,ss1306 但是做了几次,都是make 提示错误, 按照编译提示,是越改问题越多。 希望你把 相关改好的文件mail给我,谢谢! According to your instructions, ...
by OlivierLenoir
Fri Mar 19, 2021 6:40 pm
Forum: Programs, Libraries and Tools
Topic: [Solved for now] Stepper motor control in micropython
Replies: 4
Views: 309

Re: Stepper motor control in micropython

In case you're using an ESP32 device with RMT you can use this.

In case you're using an other standard GPIO device, you can use this.

The standard example is here.

Feel free to let know if you need additional information.