Search found 64 matches

by pidou46
Thu Nov 28, 2019 2:29 pm
Forum: General Discussion and Questions
Topic: Does "__slots__" make sense in micropython
Replies: 8
Views: 216

Re: Does "__slots__" make sense in micropython

I have made some tests, and confirm it save some RAM : import gc import micropython class MyClass(object): #__slots__ = ['name', 'identifier'] def __init__(self, name, identifier): self.name = name self.identifier = identifier def MyPrint(self): print('{}:{}'.format(self.name,self.identifier)) gc.co...
by pidou46
Thu Nov 28, 2019 10:45 am
Forum: General Discussion and Questions
Topic: Does "__slots__" make sense in micropython
Replies: 8
Views: 216

Re: Does "__slots__" make sense in micropython

Interesting,

Shouldn't it be mentioned in the docs (maybe in the Maximising Micropython Speed) ?

As I have I understand it could help save RAM. It not exactly speed optimisation, but it could help as I have frequently hit the RAM limit...

Am I wrong ?
by pidou46
Mon Nov 25, 2019 5:02 pm
Forum: ESP32 boards
Topic: How do i get the full 16MB on the file system? ESP32
Replies: 16
Views: 981

Re: How do i get the full 16MB on the file system? ESP32

Thanks MostlyHarmless for your explanation to ease the build of micropython firmware.

Yes, I think it definetly worth a specific topic.
by pidou46
Mon Nov 25, 2019 1:47 pm
Forum: ESP32 boards
Topic: TM2130 packwge
Replies: 3
Views: 104

Re: TM2130 packwge

I have made some experiments with Timer with a step / dir driver (like TM2130) https://github.com/pidou46/ustepper/blob/master/ustepper.py The general idea is to setup a PWM output and stop it with a Timer. You just need to compute the Timer delay to achieve the desired stroke. This solution is quit...
by pidou46
Thu Nov 07, 2019 9:28 pm
Forum: Programs, Libraries and Tools
Topic: New version of Thonny IDE
Replies: 6
Views: 841

Re: New version of Thonny IDE

This latest release bring studding stability, it works flawlessly for all my uses cases.

kudos to Aivar :D
by pidou46
Thu Nov 07, 2019 9:23 pm
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 764

Re: Set Pins values synchroniously

Still, I think OutoftheBOTS_ is right it could be usefull to have synchro pin value setting build in micropython, it would bring easyness and portability, I will probably open an issue on git repository since I'm (still) not able to make a PR by myself...
by pidou46
Thu Nov 07, 2019 9:16 pm
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 764

Re: Set Pins values synchroniously

Nice, it works like a charm with the latest build.

Thank you
by pidou46
Thu Nov 07, 2019 8:25 pm
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 764

Re: Set Pins values synchroniously

I have tried the viper code, but I get the following error:

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
SyntaxError: invalid micropython decorator
I run the same code on esp8862 and doesn't get the error
by pidou46
Thu Nov 07, 2019 8:12 pm
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 764

Re: Set Pins values synchroniously

Thanks, I have build a complete working sample: from machine import Pin, mem16 p12=Pin(12, Pin.OUT) p14=Pin(14, Pin.OUT) p12.value(0) print(p12.value()) p14.value(0) print(p14.value()) #esp32 GPIO_OUT_REG=0x3FF44004 #set GPIO12 and GPIO14 to 1 GPIO=0b00000000000000000101000000000000 mem16[GPIO_OUT_R...