new file: .gitignore new file: .vscode/extensions.json new file: ErsterTest.code-workspace new file: include/README new file: lib/AnalogFiveButtons/AnalogFiveButtons.cpp new file: lib/AnalogFiveButtons/AnalogFiveButtons.h new file: lib/Imotor/Imotor.cpp new file: lib/Imotor/Imotor.h new file: lib/L298n/L298n.cpp new file: lib/L298n/L298n.h new file: lib/README new file: lib/fahrt/fahrt.cpp new file: lib/fahrt/fahrt.h new file: lib/gleis/gleis.cpp new file: lib/gleis/gleis.h new file: lib/gleisabschnitt/gleisabschnitt.cpp new file: lib/gleisabschnitt/gleisabschnitt.h new file: lib/locomotive/locomotive.cpp new file: lib/locomotive/locomotive.h new file: lib/motor/dfquad.h new file: lib/motor/motor.cpp new file: lib/motor/motor.h new file: lib/weiche/weiche.cpp new file: lib/weiche/weiche.h new file: platformio.ini new file: src/main.cpp new file: test/README
		
			
				
	
	
		
			27 lines
		
	
	
		
			473 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			473 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <weiche.h>
 | |
| 
 | |
| Weiche::Weiche(IMotor& motor):  _motor(motor)
 | |
| {
 | |
| 
 | |
| }
 | |
| 
 | |
| void Weiche::Geradeaus()
 | |
| {
 | |
|     _motor.setDirection(motorForward);
 | |
|     _motor.setSpeed(_speed);
 | |
|     Serial.println("geradeaus");
 | |
|     delay(_delay);
 | |
|     _motor.setSpeed(0);
 | |
|     Serial.println("--");
 | |
| }
 | |
| 
 | |
| void Weiche::Abzweigen()
 | |
| {
 | |
|     _motor.setDirection(motorBackward);
 | |
|     _motor.setSpeed(_speed);
 | |
|     Serial.println("abzweigen");
 | |
|     delay(_delay);
 | |
|     _motor.setSpeed(0);
 | |
|     Serial.println("--");
 | |
| }
 |