MakerWorld
Test Models
Go to Model
FPS-Tester Frames per Second Bildfrequenz
0
Downloads
1
Likes
0
Makes
Bauteile:Arduino Mega 2560 ProLED Farbe je nach vorliebe Taster 12mm x 12 mm 12mm Runder Knopf 10K Ohm WiederstandWiderstand (z.B. 220 Ohm für die LED)SH5461AS (4-stelliges 7-Segment-Display)Code:Der Code steuert die LED mit einer einstellbaren Frequenz. Mit jedem Drücken des Tasters wird die Frequenz erhöht,und das 7-Segment-Display zeigt die aktuelle Frequenz in Hertz (Hz) an.-----------------------------------------CODE----------------------------------------------#include <SevSeg.h>SevSeg sevseg; // Objekt für das 7-Segment-Displayint ledPin = 14; // LED Pinint buttonPin = 15; // Taster Pinint frequency = 1; // Startfrequenz in Hzunsigned long previousMillis = 0;int ledState = LOW;void setup() { pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT_PULLUP); // Setup für das 7-Segment-Display byte numDigits = 4; byte digitPins[] = {2, 3, 4, 5}; // Verwende Pins 2-5 für die Ziffern byte segmentPins[] = {6, 10, 11, 12, 13}; // Verwende Pins 6, 10-13 für die Segmente bool resistorsOnSegmen
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!