Lehrer Busch
/
120_robot_H_Bridge8835_UserButton_DIR_PWM_I2C_LCD
120_robot_H_Bridge8835_UserButton_DIR_PWM_I2C_LCD
main.cpp
- Committer:
- itbusch
- Date:
- 2022-02-15
- Revision:
- 1:821dba977886
- Parent:
- 0:3ace550537fc
File content as of revision 1:821dba977886:
/* mbed BuschA, */ #include "mbed.h" #include "LCD.h" #include "LCD_Bua.h" // Set the LCD address to 0x27 for a 16 chars and 2 line display DigitalIn User_Button(PC_13); //PullUp auf Board, PC13 int main() { mylcd.clear(); // LCD löschen M1_PWM.period_ms(10); // PWM-Periode while (true) { if (User_Button == false) { M1_DIR = 1; M1_PWM = 0.5; //Tastgrad 0-1 } else { M1_DIR = 1; M1_PWM = 0.95; } Ausgabe_LCD(); thread_sleep_for(1000); //Sleep = Warten... } }