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
/*...................... | |
* BTS7960 HBridge Test | |
* | |
* Simple example of using the BTS7960 HBridge to control a motor | |
* This sketch simply sends a pwm signal to the HBridge to spin the motor | |
* one way and then spin the motor the other direction. | |
* | |
* PWM Description for Arduino: https://www.arduino.cc/en/tutorial/PWM | |
* | |
* By : Barry Tarlton |
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
############################################################### | |
## Simple code to use PWM on the PI to control the BTS7960 | |
## | |
## This simply spins the motor in one direction slowly | |
## speeding up slowly and then slowing down slowly over | |
## and over again. | |
## | |
############################################################### | |
import RPi.GPIO as GPIO |
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
# Servo Control | |
import time | |
import wiringpi | |
def moveToDegree(degrees): | |
wiringpi.pwmWrite(18, degrees) | |
# https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/servo-motors |
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 <Wire.h> // Enable this line if using Arduino Uno, Mega, etc. | |
#include <Adafruit_GFX.h> | |
#include "Adafruit_LEDBackpack.h" | |
Adafruit_7segment matrix = Adafruit_7segment(); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
Serial.println("7 Segment Backpack Test"); |