This file contains hidden or 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
// checkout for more -> https://github.com/Roboteurs/Product-code/tree/master/BT/BT.3.0.1 | |
#include "PAN1321.h" | |
const int analogInPin = A0; | |
int sensorValue = 0; | |
// the serial and bluetooth are all intialized in Init_Bluetooth | |
void setup() { | |
Init_Bluetooth(); |
This file contains hidden or 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 program will read a sensor attached to the RB-MD.3.0.1 booster pack. | |
the sensor it reads is on pin 2 | |
@Directions: To view the output of this program open device manager and look under COM and LPT | |
you should see the lauchpad listed as "COMXX" use putty and open this COM port to view the | |
values. Check the video tutorial for more info | |
*/ | |
void setup() { |
This file contains hidden or 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 program will actuate a servo motor back and forth from 0 to 180 degrees | |
*/ | |
#include <Servo.h> | |
// define the servo object and the angle variable | |
Servo servo1; | |
int angle1 = 0; | |
void setup() { |
This file contains hidden or 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 program will drive a 2 phase (4 wire) bipolar stepper motor | |
with the RB-MD.3.0.1 luachpad booster pack | |
*/ | |
#include <Stepper.h> | |
const int stepsToTravel = 200; | |
// setup stepper motor on correct pins to match the RB-MD.3.0.1 | |
Stepper myStepper(stepsPerRevolution, 9,10,12,13); |
This file contains hidden or 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 program is used to control a Bammer motor driver. This code may also | |
* be compatable with other motor drivers with direction and enable pins | |
*/ | |
// define the pins that are connected to the Bammer | |
const int motor1_direction = 2; | |
const int motor1_pwm = 9; | |
const int motor1_sleep = 4; |
This file contains hidden or 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
const int analogInPin = A0; | |
int sensorValue = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { |
This file contains hidden or 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
/* Read Quadrature Encoder | |
* Connect Encoder to Pins encoder0PinA, encoder0PinB, and +5V. | |
* | |
* Sketch by max wolf / www.meso.net | |
* v. 0.1 - very basic functions - mw 20061220 | |
* | |
*/ | |
int val; |
This file contains hidden or 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
/* | |
Stepper Motor Control - one revolution | |
This program drives a unipolar or bipolar stepper motor. | |
The motor is attached to digital pins 8 - 11 of the Arduino. | |
The motor should revolve one revolution in one direction, then | |
one revolution in the other direction. |
This file contains hidden or 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 "mbed.h" | |
#include "rtos.h" | |
/* the pins that will be used on the Nucleo board */ | |
AnalogIn analog_value(A0); | |
PwmOut mypwm(D10); | |
DigitalOut directionPin(D2); | |
DigitalOut enablePin(D3); | |
DigitalOut led1(LED1); |
This file contains hidden or 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
#!/usr/bin/python3 | |
import Slush | |
import time | |
b = Slush.sBoard() | |
#define the motor that is being used | |
m1 = Slush.Motor(0) | |
#print the position of the motor before we spin it |
OlderNewer