Skip to content

Instantly share code, notes, and snippets.

@corck
Last active June 28, 2018 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corck/b21dc278c6d7b1487999e6eee682a1e5 to your computer and use it in GitHub Desktop.
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.
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