Skip to content

Instantly share code, notes, and snippets.

View hbradio's full-sized avatar

Brady Hurlburt hbradio

View GitHub Profile

micro-bit V2 connection debugging

Ubuntu, alpha

Chrome:

Uncaught (in promise) DOMException: Connection failed for unknown reason.

Micro:bit display:

{
"slides":[
{
"id":0,
"content-url":"https://s3.whatever/rovercode/getting-conntected-tutorial/putting-in-batteries.md",
"actions":[
{
"id":0,
"type":"button",
"text":"Ok, let's go!",

Keybase proof

I hereby claim:

  • I am aninternetof on github.
  • I am bradyhurlburt (https://keybase.io/bradyhurlburt) on keybase.
  • I have a public key ASAk3kbeThRppb9KDl7EXtSgDZ7bgZPAbpuTqeB0bPOp9Qo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am aninternetof on github.
  • I am bradyhurlburt (https://keybase.io/bradyhurlburt) on keybase.
  • I have a public key ASAk3kbeThRppb9KDl7EXtSgDZ7bgZPAbpuTqeB0bPOp9Qo

To claim this, I am signing this object:

#!/usr/bin/python
import websocket
import thread
import time
import json
def on_message(ws, message):
print message
def on_error(ws, error):
LEFT_EYE_LED_CURRENT=20
LEFT_EYE_THRESHOLD=2175
RIGHT_EYE_LED_CURRENT=20
RIGHT_EYE_THRESHOLD=2605
<div class="someclass" id="nameofyourid">
Lorem ipsum
</div>
<h1 id="nameofanotherid"> An Awesome Section</h1>
import lib
# A not-great example
class MyLessGoodClass:
def do_something(self):
x = lib.get_thing()
return x + 1
def do_another_thing(self):
def myfunc(thing):
return thing + 1
myfunc(lib.get_thing())
def myfunc():
x = lib.get_thing()
return x+1
myfunc()