tflander / esp32-machine-emulator Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi!
I was very happy to see the work you've put down here. I've been frustrated with the difficulties of doing TDD with Micropython. I feel like I've been spoiled with pytest.
I'm still a bit new to Micropython but I'm struggling getting your module to work. When I fire up micropython after upip installing your module I try to import 'machine' and it fails.
$ micropython
MicroPython v1.12 on 2020-01-11; darwin version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import machine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "machine.py", line 69, in <module>
AttributeError: 'module' object has no attribute 'sleep_us'
This is a weird message as line 69 looks resonable:
time.sleep_us = sleep_us_for_monkey_patching
This leads me thinking that I'm missing something fundamental.
PS: I'll be happy to contribute a users guide if you want to. I just need to get to the place where I can use the module first. :-)
All the best,
Per.
Certainly, here's a draft for an issue you can create for the esp32-machine-emulator
project:
Title: Request for Enhanced MicroPython Module Support
Description:
I want to express my appreciation for the fantastic work you've done with the esp32-machine-emulator
project. It has been incredibly helpful in enabling me to efficiently write MicroPython code within Visual Studio Code. However, while using this tool, I've noticed that some MicroPython modules may not be fully supported or have code completion. I wanted to kindly request your assistance in enhancing the project by adding support for these modules.
Specifically, the following modules seem to be missing or incomplete in terms of code completion:
MicroPython v1.22.0-preview.54.g95d8b5fd5 on 2023-10-25; Generic ESP32S3 module with ESP32S3
Type "help()" for more information.
>>> help('modules')
__main__ bluetooth heapq select
_asyncio btree inisetup socket
_boot builtins io ssl
_espnow cmath json struct
_onewire collections machine sys
_thread cryptolib math time
_webrepl deflate micropython uasyncio
aioespnow dht mip/__init__ uctypes
apa106 ds18x20 neopixel umqtt/robust
array errno network umqtt/simple
asyncio/__init__ esp ntptime upysh
asyncio/core esp32 onewire urequests
asyncio/event espnow os webrepl
asyncio/funcs flashbdev platform webrepl_setup
asyncio/lock framebuf random websocket
asyncio/stream gc re
binascii hashlib requests/__init__
Plus any modules on the filesystem
These modules are essential for MicroPython development, and having code completion support for them in the esp32-machine-emulator
project would greatly enhance the development experience. Your consideration of this request would be highly appreciated.
Thank you for your dedication to this project, and I look forward to the possibility of an even more comprehensive MicroPython development environment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.