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 "primitives/std.lib"; | |
component main(go: 1, clk: 1) -> (done: 1) { | |
cells { | |
lt = prim std_lt(1); | |
a1 = prim std_reg(1); | |
a2 = prim std_reg(1); | |
a3 = prim std_reg(1); | |
a4 = prim std_reg(1); | |
a5 = prim std_reg(1); | |
a6 = prim std_reg(1); |
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 "primitives/std.lib"; | |
component main() -> () { | |
cells { | |
lt = prim std_lt(1); | |
a1 = prim std_reg(1); | |
a2 = prim std_reg(1); | |
a3 = prim std_reg(1); | |
a4 = prim std_reg(1); |
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
int sPin = A5; // Pin for the servo signal input | |
int buttonPin = D0; // Pin for the button input | |
Servo serv; // Instance of Servo object; takes care of low-level servo communication | |
void setup() { | |
serv.attach(sPin); // Tells the Servo object which pin the servo is connected to | |
// Allows us to use the button pin for input. | |
// Read about "pull up" resistors here: http://playground.arduino.cc/CommonTopics/PullUpDownResistor | |
pinMode(buttonPin, INPUT_PULLUP); |
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
int sPin = A5; // Pin for the servo signal input | |
int buttonPin = D0; // Pin for the button input | |
Servo serv; // Instance of Servo object; takes care of low-level servo communication | |
void setup() { | |
serv.attach(sPin); // Tells the Servo object which pin the servo is connected to | |
// Allows us to use the button pin for input. | |
// Read about "pull up" resistors here: http://playground.arduino.cc/CommonTopics/PullUpDownResistor | |
pinMode(buttonPin, INPUT_PULLUP); |
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
/* Combo Sweep with PushButton | |
*/ | |
#include <Servo.h> | |
#include <Adafruit_NeoPixel.h> | |
#define NUM_PIXELS 1 | |
#define PIN_NUMBER 1 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, PIN_NUMBER); |
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
int sPin = A5; // Pin for the servo signal input | |
int buttonPin = D0; // Pin for the button input | |
Servo serv; // Instance of Servo object; takes care of low-level servo communication | |
void setup() { | |
serv.attach(sPin); // Tells the Servo object which pin the servo is connected to | |
// Allows us to use the button pin for input. | |
// Read about "pull up" resistors here: http://playground.arduino.cc/CommonTopics/PullUpDownResistor | |
pinMode(buttonPin, INPUT_PULLUP); |
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
/* Combo Sweep with PushButton | |
*/ | |
#include <Servo.h> | |
Servo myservo; // create servo object to control a servo | |
// twelve servo objects can be created on most boards | |
int pos = 0; // variable to store the servo position |