Skip to content

A simple square wave clock for the Raspberry Pi Pico.

License

Notifications You must be signed in to change notification settings

t-schreibs/PIOClock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PIOClock

A simple square wave clock for the Raspberry Pi Pico.

Usage

To instantiate and use a PIO Clock:

  1. Import PIOClock at the top of your script.
  2. Use clock = PIOClock.Clock(<state_machine_id>, <pin_number>) to instantiate a new clock with the provided state machine and pin.
    • State machine IDs range from 0-7, and each clock will need a unique state machine ID.
    • Each clock will also require a unique pin number.
  3. Set the hertz value of a clock with clock.set(<hertz>).

Testing

This repository includes a testing class. Copy over the PIOClock.py file to a Pi Pico, save ClockTest.py as main.py in the root directory of the Pico, and then you can run it to evaluate the PIO Clock class.

About

A simple square wave clock for the Raspberry Pi Pico.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages