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
-- Blink using timer alarm -- | |
timerId = 0 | |
dly = 1000 | |
-- use D4 | |
ledPin = 4 | |
-- set mode to output | |
gpio.mode(ledPin,gpio.OUTPUT) | |
ledState = 0 | |
-- timer loop | |
tmr.alarm( timerId, dly, 1, function() |
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
import sys | |
import traceback | |
import StringIO | |
from copy_reg import dispatch_table, pickle | |
def exc_info(hide_calls = 0): | |
'''as sys.exc_info() but returns a remote exception object''' | |
ErrorType, thrownError, traceback = sys.exc_info() | |
for i in range(hide_calls): |