Search found 126 matches

by OlivierLenoir
Wed Aug 17, 2022 5:14 am
Forum: General Discussion and Questions
Topic: 2D Arrays/Matrix in micropython
Replies: 5
Views: 17125

Re: 2D Arrays/Matrix in micropython

MicroPython - Matrix, basic matrix operations, using list. The project is available here.
by OlivierLenoir
Wed Aug 03, 2022 5:00 am
Forum: ESP32 boards
Topic: connect mysql to esp32
Replies: 2
Views: 2080

Re: connect mysql to esp32

Didi you try using MQTT?
Your first ESP32 publish data. MySQL and your second ESP32 subscribe to data.
by OlivierLenoir
Tue Aug 02, 2022 5:07 am
Forum: General Discussion and Questions
Topic: Frustrations with missing libraries?
Replies: 18
Views: 22413

Re: Frustrations with missing libraries?

Thanks to share your code and the error message to understand the situation.
For library, you can download and copy them on your device or use upip, documentation is here.
by OlivierLenoir
Wed Jul 20, 2022 5:41 am
Forum: ESP32 boards
Topic: machine.PWM with duty=0 not staying low
Replies: 4
Views: 2555

Re: machine.PWM with duty=0 not staying low

AwesomeCronk wrote:
Tue Jul 19, 2022 12:28 pm
So then why, when both pins were initialized to low, does the PWM object, when initialized to duty=0, not go to duty=0?
In your code, I just see the initialization of m0. It's maybe the reason why the motor were not stop.
Hopping this helps. :D
by OlivierLenoir
Mon Jul 18, 2022 7:08 pm
Forum: ESP32 boards
Topic: machine.PWM with duty=0 not staying low
Replies: 4
Views: 2555

Re: machine.PWM with duty=0 not staying low

IN1 and IN2 need to be both Low for stop or both Hight for STOP. Page 4/15 of the datasheet.

Code: Select all

from machine import Pin, PWM
m0 = PWM(Pin(10))
m1 = PWM(Pin(27))

m0.duty_u16(0)
m1.duty_u16(0)

m0.freq(500)
m1.freq(500)
by OlivierLenoir
Wed Jul 13, 2022 8:04 pm
Forum: General Discussion and Questions
Topic: How do I "dynamically" name my servo?
Replies: 10
Views: 5251

Re: How do I "dynamically" name my servo?

twodoctors wrote:
Wed Jul 13, 2022 3:19 pm
My next challenge to myself is to try and figure out how pop 2 random targets up at a time (instead of 1). Keep an eye out for another "Help me please!" post from me soon! :lol:
I've publish a new release available here, with the ShootingGallery.rand_multi().
by OlivierLenoir
Tue Jul 12, 2022 5:32 am
Forum: General Discussion and Questions
Topic: How do I "dynamically" name my servo?
Replies: 10
Views: 5251

Re: How do I "dynamically" name my servo?

twodoctors wrote:
Tue Jul 12, 2022 1:01 am
You put me to shame Olivier! :lol: I won't show you my code then!
Twodoctors be pound of your code.
The secret to code is to follow PEP20 - Zen of Python and those two steps:
  • Make it work
  • Improve it
Let us know if you want help to understand OOP.
by OlivierLenoir
Mon Jul 11, 2022 8:04 pm
Forum: General Discussion and Questions
Topic: How do I "dynamically" name my servo?
Replies: 10
Views: 5251

Re: How do I "dynamically" name my servo?

I've started a project MicroPython-ShootingGallery, I plan to use it for archery training. You can see it on develop branch.
It's just the beginning.

You create Target(servo_pin, hide_duty_ns, show_duty_ns), then you add target to ShootingGallery.
by OlivierLenoir
Mon Jul 04, 2022 6:46 pm
Forum: General Discussion and Questions
Topic: random.sample or similar?
Replies: 6
Views: 1958

Re: random.sample or similar?

Another solution is to mimic the shuffle function. from random import randrange targets = ['Target1', 'Target2', 'Target3', 'Target4', 'Target5', 'Target6', 'Target7', 'Target8', 'Target9', 'Target10'] count_target = len(targets) for _ in range(count_target): target = targets.pop(randrange(0, count_...
by OlivierLenoir
Mon Jul 04, 2022 5:10 am
Forum: Programs, Libraries and Tools
Topic: Multiaxis stepper motors using RMT
Replies: 37
Views: 28475

Re: Multiaxis stepper motors using RMT

Thanks for sharing your test. As I mention in the README, - RMT, MutliAxis.g01(), manage start period (µs) (start frequency), target period (µs) (target frequency) and acceleration / deceleration rate (µs per step) /!\ still working on Axis.steps() acceleration / deceleration . In branch bresenham ,...