Last active
June 28, 2018 22:10
-
-
Save corck/b21dc278c6d7b1487999e6eee682a1e5 to your computer and use it in GitHub Desktop.
Lora Lopy wearic smart textile developer kit test. switch on and off leds through Lopy extension board.
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 network import LoRa | |
import pycom | |
import socket | |
import time | |
import binascii | |
import json | |
from network import WLAN | |
from network import Bluetooth | |
bt = Bluetooth() | |
bt.deinit() | |
print('Starting') | |
from machine import Pin | |
pycom.rgbled(0x7fff00) | |
# See https://docs.pycom.io for more information regarding library specifics | |
p_out = Pin('P8', mode=Pin.OUT) | |
p_out.value(1) | |
p_blue = Pin('P11', mode=Pin.OUT) | |
p_blue.value(0) | |
n = 0 | |
while(True): | |
print('toggleing: ', n) | |
pycom.rgbled(0x7f0000) | |
p_out.toggle() | |
p_blue.toggle() | |
time.sleep(0.5) | |
n = n + 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment