This release is a pre-release and may not be stable for production use.
# blink #
This project demonstrates how an Arduino sketch may be distributed as a Python package.
## Programming sketch using arduino_helpers and avr_helpers ##
Although not strict dependencies of the blink package, by using [arduino_helpers][1] and [avr_helpers][2], we can easily flash the compiled .hex firmware files included in the blink package.
For example:
>>> import blink >>> board = 'diecimila' >>> firmware = blink.get_firmwares()[board][0] >>> firmware.name path('blink.hex') >>> from arduino_helpers.context import ArduinoContext, Board, Uploader >>> # For Ubuntu systems, Arduino IDE is installed at `/usr/share/arduino`. >>> context = ArduinoContext('/usr/share/arduino') >>> uploader = Uploader(Board(context, board)) >>> from avr_helpers import AvrDude >>> # Automatically select port, by iterating through available serial >>> # ports until a connection can be established. >>> avr_dude = AvrDude(uploader.protocol, uploader.board_context.mcu, uploader.speed) >>> stdout, stderr = avr_dude.flash(firmware, ['-D']) >>> print stderravrdude-x64: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-x64: Device signature = 0x1e9406 avrdude-x64: reading input file “blink.hex” avrdude-x64: writing flash (1056 bytes):
Writing | ################################################## | 100% 0.76s
avrdude-x64: 1056 bytes of flash written avrdude-x64: verifying flash memory against blink.hex: avrdude-x64: load data flash data from input file blink.hex: avrdude-x64: input file blink.hex contains 1056 bytes avrdude-x64: reading on-chip flash data:
Reading | ################################################## | 100% 0.67s
avrdude-x64: verifying … avrdude-x64: 1056 bytes of flash verified
avrdude-x64 done. Thank you.
[1]: https://github.com/wheeler-microfluidics/arduino_helpers [2]: https://github.com/wheeler-microfluidics/avr_helpers
Metadata
Release files for wheeler.blink 0.1.post2.dev193877662
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wheeler.blink-0.1.post2.dev193877662.tar.gz | 49.2 kB | Without provenance | Details for wheeler.blink-0.1.post2.dev193877662.tar.gz |
Release files / wheeler.blink-0.1.post2.dev193877662.tar.gz
| Download URL | wheeler.blink-0.1.post2.dev193877662.tar.gz |
|---|---|
| Size | 49.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c1fd0d4f984b3032e0e4ac41b84c6f09dff4af618c79aa70ed8ba85308ae9d8
|
|
BLAKE2b-256 checksum How to use checksums |
7829442210c580feea9069c66df621d84fe5e669cd26fb3ae267040b52fb0afc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wheeler.blink 0.1.post2.dev193877662
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.