Created
September 3, 2016 15:34
-
-
Save fraguada/71456b09cf585c57206a52814e93c2ce to your computer and use it in GitHub Desktop.
PyMetawear Neopixel Simple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymetawear import libmetawear | |
from pymetawear.client import MetaWearClient | |
c = MetaWearClient('XX:XX:XX:XX:XX:XX', 'pygatt', debug=True) | |
print("New client created: {0}".format(c)) | |
#args board, strand, pin, #pixels, color order | |
libmetawear.mbl_mw_neopixel_init_slow_strand(c.board, 0, 0, 1, 0) | |
#args board, strand, pixel id, r, g, b | |
libmetawear.mbl_mw_neopixel_set_color(c.board, 0, 0, 100, 100, 100) | |
print('about to disconnect') | |
libmetawear.mbl_mw_neopixel_free_strand(c.board,0) | |
c.disconnect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment