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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* This code is up to date for use with the "Claw Pro R3" | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic | |
* Adapted by Concord Consortium, 2023. |
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
{ | |
"rowMap": { | |
"B0rVs5_fa3cLYNH_": { | |
"id": "B0rVs5_fa3cLYNH_", | |
"isSectionHeader": true, | |
"sectionId": "start", | |
"tiles": [] | |
}, | |
"GTGXP-3bG7lQpFmt": { | |
"id": "GTGXP-3bG7lQpFmt", |
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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* This code is up to date for use with the "Claw Pro R3" | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic | |
* Adapted by Concord Consortium, 2023. |
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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* THIS IS FOR THE 2022 Version of the Gripper | |
* | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic |
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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* THIS IS FOR THE 2023 Version of the Gripper | |
* | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic |
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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* THIS IS FOR THE 2022 Version of the Gripper | |
* | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic |
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
/* | |
* ---------------------------------------------------------------------------------------------------- | |
* Muscle SpikerShield Arduino UNO Code for Interface with Dataflow | |
* | |
* This sketch allows for two way communication between Concord Consortium's Dataflow Tile and | |
* Backyard Brains' Muscle Spiker Shield & associated hardware. The FSR and EMG sensor pins are set | |
* to match the 2023 Gripper/Shield combination. | |
* | |
* Based on original script by Backyard Brains 2015, by Marcio Amorim and Stanislav Mircic | |
* Adapted by Concord Consortium, 2023. |
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
private tick = () => { | |
const {tileModel, playBackIndex, isPlaying} = this.props; | |
const dataSet = tileModel.dataSet; | |
const now = Date.now(); | |
this.setState({lastIntervalDuration: now - this.lastIntervalTime}); | |
this.lastIntervalTime = now; | |
const isCleared = this.props.programRecordState === 0; | |
const isRecording = this.props.programRecordState === 1; | |
const isRecorded = this.props.programRecordState === 2; |
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
/** | |
* micro:bit + Dataflow: "Listener Program" | |
* | |
* This is the basic program for the micro:bit physically attached to the computer. | |
* A companion program "Broadcaster Program" runs on the micro:bits not physically attached to the computer. | |
* | |
* An alternative approach would use the same program on all microbits, with lots of mode-checking. | |
* This is here as a proof-of-concept | |
* | |
* [ A ] - mode 1 - "awake" : pass `name:value` rxed from from radio to serial (dataflow) |
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
#define NUM_LED 6 //sets the maximum numbers of LEDs | |
#define MAX 150 //maximum posible reading. TWEAK THIS VALUE!! | |
int reading[10]; | |
int finalReading; | |
byte litLeds = 0; | |
byte multiplier = 1; | |
byte leds[] = {8, 9, 10, 11, 12, 13}; | |
void setup(){ | |
Serial.begin(9600); //begin serial communications |
NewerOlder