Skip to content

Instantly share code, notes, and snippets.

@boochow
Created March 6, 2018 13:53
Show Gist options
  • Save boochow/abb3119723b10219b00095b7a175a17c to your computer and use it in GitHub Desktop.
Save boochow/abb3119723b10219b00095b7a175a17c to your computer and use it in GitHub Desktop.
import math
hid = pyb.USB_HID()
def osc(n, d):
for i in range(n):
hid.send((0, int(20 * math.sin(i / 10)), 0, 0))
pyb.delay(d)
# osc(100, 50)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment