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
var utopiary = require("../../../lib/ifi/utopiary.js"), | |
topiclogic = require("../../../lib/ifi/topiclogic.js"), | |
screenplay = require("../../../lib/ifi/client/screenplay.js"); | |
var $ = screenplay.$, | |
getBaseName = topiclogic.getBaseName, | |
getRootTopic = topiclogic.getRootTopic; | |
var albumSource = { | |
hello:{ |
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
#include "MicroBit.h" | |
#include "MicroBitDisplay.h" | |
MicroBitSerial serial(MICROBIT_PIN_P14, MICROBIT_PIN_P15); | |
MicroBitDisplay display; | |
const char commandbytes[] = {0xFF, 0x01, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79}; | |
ManagedString command(commandbytes, 9); |
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
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 British Broadcasting Corporation. | |
This software is provided by Lancaster University by arrangement with the BBC. | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
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
#include "MicroBit.h" | |
/* Raygun pin mapping - listed in Kitronik breakout order | |
* 0 : MO Motor low-side-switch NPN pin | |
* 5 : TS Trigger Switch (configured as ButtonA) | |
* 1 : L1 Light 1 high-side-switch NPN Base | |
* 8 : L2 Light 2 high-side-switch NPN Base | |
* 11 : RS Red button switch (configured as ButtonB) | |
* 12 : BL Blue LED | |
* 2 : PZ Piezo speaker |
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 microbit import * | |
import neopixel | |
# Setup the Neopixel strip on pin0 with a length of 8 pixels | |
np = neopixel.NeoPixel(pin0, 8) | |
def wheel(wheelByte): | |
wheelByte = 255 - wheelByte | |
if wheelByte < 85: | |
return (255 - wheelByte * 3, 0, wheelByte * 3) |
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 asyncio | |
import traceback | |
async def liver(lifeDelay): | |
try: | |
while True: | |
print("Living....la la la") | |
await asyncio.sleep(lifeDelay) | |
finally: | |
print("living() finished. Aaargh!") |
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 | |
if sys.implementation.name == "cpython": | |
import asyncio | |
elif sys.implementation.name == "micropython": | |
import uasyncio as asyncio | |
async def count(bound=8,delay=0.1): | |
for num in range(bound): | |
await asyncio.sleep(delay) |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/home/cefn/testnodeenv/bin/node', | |
1 verbose cli '/home/cefn/testnodeenv/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli 'startbootstrap-blog-post' ] | |
2 info using npm@5.6.0 | |
3 info using node@v9.10.1 | |
4 verbose config Skipping project config: /home/cefn/.npmrc. (matches userconfig) | |
5 verbose npm-session d7e556ded09c672c | |
6 silly install loadCurrentTree |
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
virtualenv myenv | |
pip3 install vgkits-vanguard | |
vanguard see firmware | |
vanguard brainwash circuitpython | |
vanguard shell | |
Launching Miniterm to connect to Vanguard Python Shell | |
Running 'serial.tools.miniterm --raw --eol CR --encoding ascii /dev/ttyUSB0 115200' | |
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 --- | |
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd"> | |
<!--Created by yEd 3.18.1--> | |
<key attr.name="Description" attr.type="string" for="graph" id="d0"/> | |
<key for="port" id="d1" yfiles.type="portgraphics"/> | |
<key for="port" id="d2" yfiles.type="portgeometry"/> | |
<key for="port" id="d3" yfiles.type="portuserdata"/> | |
<key attr.name="url" attr.type="string" for="node" id="d4"/> | |
<key attr.name="description" attr.type="string" for="node" id="d5"/> | |
<key for="node" id="d6" yfiles.type="nodegraphics"/> |