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
| /* | |
| * AndySightM5Stack - Color Selector with Brightness Slider | |
| * M5Stack Core2 with WS2812B RGB LED on GPIO 33 | |
| * | |
| * Touch a colour swatch to change the LED colour. | |
| * Drag the slider at the bottom to set brightness. | |
| * Screen sleeps after 30 s of inactivity; any tap wakes it. | |
| * Requires: M5Unified, FastLED libraries | |
| */ |
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
| import asyncio | |
| import math | |
| import time | |
| import moteus | |
| import matplotlib.pyplot as plt | |
| async def main(): | |
| t = moteus.Fdcanusb(path="/dev/tty.usbmodemFBE14B831") | |
| c = moteus.Controller(transport=t) |
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 <mcp_can.h> | |
| #include <SPI.h> | |
| MCP_CAN CAN0(10); // Set CS to pin 10 | |
| #define StepValue 130 | |
| /* Define Joystick connection pins */ | |
| #define UP A1 | |
| #define DOWN A3 |