-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tasklist! #2
Comments
Probably about time to get a steer if the direction is correct. See https://github.com/cefn/Adafruit_Micropython_Blinka for the work-in-progress repository. I have put together package and test suite structure allowing test suites to be run against...
A shallow description of the testing regime is at https://github.com/cefn/Adafruit_Micropython_Blinka/blob/master/notes/index.md although it has been very much in flux until recently, so documentation of the testing framework probably shouldn't be overdone right now. This is not intended to be a test suite with extensive coverage, but it provides a useful structure for contributors to propose targets and demonstrate results as well as for project leaders to articulate differences and set directions for the work through test-driven development. I have put some time into routines which selectively synchronize the relevant compatibility layers to the different platforms to accelerate testing, and I have some more days still in hand to work on this (roughly 5 days were set aside in total) so I am moving to have a go at I2C as proposed. Note the issues at https://github.com/cefn/Adafruit_Micropython_Blinka/issues about completing PEP8 compliance and RST docstrings throughout but only if time remains after technical successes are achieved with the codebase so that it's seen to be worth doing this work. I will be led by your feedback. So far the fundamentals of board, microcontroller and digitalio are operational in the compatibility layer, as indicated by the session documented at cefn#2 (comment) . These have been recently tested on Huzzah and Pyboard, and I will return occasionally to M0 Express for conformance but the available memory was tight requiring tests to be run manually and individually on that platform, so I am waiting for the testing framework to be more settled before building frozen images and revisiting the M0 Express to verify conformance. Before putting together a PR, I am aware you might want a different structure in the long run (only the compatibility layer - no testing or upload scripts, perhaps not a python directory). I don't want to pollute your working copy with the wrong structure but it's sure easier to operate with everything in one place right now. If you let me know what preferred structure I should PR I'm happy to do so. Finally it's great to be working with you and I am very keen to ensure I deliver the right stuff, and welcome your thoughts and insights on what I could do better. |
hey! looks good so far. yeah the m0 express is tight on memory, mpy helps but there's limited - im ok with occasional 'end of the task' tests to verify rather than trying to do constant checks. |
ok tested with a pyb and left some notes. really great so far! keep going :) |
I added one comment on the microcontroller.pin stuff but looks good otherwise! Good work! |
Soldered together all the bits, got familiar with relevant CircuitPython libs and I2C is now minimally functional on ESP8266 (BME280 attributes correctly populated) as of cefn@b73cdee Testing with Pyb tomorrow. |
awesome! :) |
Yesterday was Paragliding weather :). For now I have put aside I2C test coverage for Pyboard etc. as a task to go back to as I think there will be a lot more needed to get substantial coverage anyway. Right now want to make sure there are technical results across the piece to help us assess next steps, so was visiting SPI and UART. Unfortunately I followed the link in the Tasklist which was (incorrectly?) linked to bitbangio so put some time into wrapping the bitbang implementation continuing from I2C. However, looking back at the task list, perhaps the title of the task bullet test should be respected, which said busio and would map to the hardware SPI instead. Which one should I be looking at? The example file at https://github.com/adafruit/Adafruit_CircuitPython_RFM69/blob/master/examples/simpletest.py uses busio not bitbangio but I don't know if that's fundamental to RFM69. |
woops typo on my part, i meant busio for all these (altho bitbangio has the same api, fyi, it just does the pin toggles by hand rather than depending on a built in hardware support peripheral) |
Understood. Need to spin up into some other issues. |
So there is now a PR fulfilling this Tasklist except...
Can the oscilloscope trace indicate anything about the implementation choices made in the adafruit_blinka compatibility layer, or would I be investigating the timing-performance of Micropython's software/board hardware implementations. That might be beyond my expertise. |
Rebase changes and point to latest Platform Detect
Add Orange PI 2 constant (Attempt #2)
Closing since to my knowledge code is all working. |
This project is to 'port' the hardware API we use in CircuitPython as a python layer to MicroPython running on Pyboard or ESP8266. Since CircuitPython uses the same Python3 runtime, its just a matter of matching up the 'pyb' and 'esp' hardware commands for pins, i2c, spi, neopixels, etc.
Once complete, you should be able to run just-about-any CircuitPython library or project on a MicroPython board.
Here are the modules in circuitpython:
http://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html#modules
Your tasks:
Start with 'board' (pin definitions/names) and 'digitalio' (basic gpio support) http://circuitpython.readthedocs.io/en/latest/shared-bindings/board/__init__.html and http://circuitpython.readthedocs.io/en/latest/shared-bindings/digitalio/__init__.html
Completed 'bitbangio.I2C' http://circuitpython.readthedocs.io/en/latest/shared-bindings/bitbangio/I2C.html as per original tasklist
Hop over to 'busio.I2C' http://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/I2C.html
'busio.SPI' ! http://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/SPI.html
'busio.UART'
You will likely need to revision 'board' at this time and do some updates as you work on busio
We'll evaluate our standing at this time and see if it makes sense to attack 'pulseio'
You'll need hardware that runs both MicroPython and CircuitPython:
The text was updated successfully, but these errors were encountered: