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
#install rocm as found here -> https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html | |
sudo apt update | |
sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)" | |
sudo apt install python3-setuptools python3-wheel | |
sudo usermod -a -G render,video $LOGNAME # Add the current user to the render and video groups | |
wget https://repo.radeon.com/amdgpu-install/6.3.3/ubuntu/noble/amdgpu-install_6.3.60303-1_all.deb | |
sudo apt install ./amdgpu-install_6.3.60303-1_all.deb | |
sudo apt update | |
sudo apt install amdgpu-dkms rocm |
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
''' | |
the example uses the move command and the manual limit switch check command. It moves the motor and then checks the limit switch. | |
this can be used to do fine manual homing | |
''' | |
import Slush | |
#setup the motor | |
b = Slush.sBoard() | |
m = Slush.Motor(1) |
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
void setup() { | |
pinMode(2, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(2, HIGH); | |
delay(1000); | |
digitalWrite(2, LOW); | |
delay(1000); | |
} |
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 | |
#configure the slush library | |
import Slush | |
import time | |
b = Slush.sBoard() | |
#setup a motor, more than one motor can be setup here | |
m0 = Slush.Motor(0) |
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 | |
#setup the slushengine | |
import Slush | |
b = Slush.sBoard() | |
#setup a few different motors, this can also be done in an array | |
m0 = Slush.Motor(0) | |
m1 = Slush.Motor(1) | |
m2 = Slush.Motor(2) |
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 |
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
/* | |
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
/* 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
const int analogInPin = A0; | |
int sensorValue = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { |
NewerOlder