Hi
die Kiste läuft ja auf 16mhz.
Hier mal der Code(nicht elegant, aber funktioniert(mit 8servos):
Mfg suluCode:$regfile = "m8def.dat" Config Servos = 10 , Servo1 = Portc.0 , Servo2 = Portb.1 , Servo3 = Portb.2 , Servo4 = Portb.3 , Servo5 = Portb.4 , Servo6 = Portb.5 , Servo7 = Portc.3 , Servo8 = Portc.1 , Servo9 = Portd.7 , Servo10 = Portd.6 , Reload = 2 Config Pinc.0 = Output Config Pinb.1 = Output Config Pinb.2 = Output Config Pinb.3 = Output Config Pinb.4 = Output Config Pinb.5 = Output Config Pinc.3 = Output Config Pinc.1 = Output Config Pind.7 = Output Config Pind.6 = Output Enable Interrupts Dim A As Byte Dim B As Byte Dim C As Byte A = 1 B = 1 C = 1 Servo(1) = 100 Servo(2) = 100 Servo(3) = 100 Servo(4) = 100 Servo(5) = 100 Servo(6) = 100 Servo(7) = 100 Servo(8) = 100 Servo(9) = 100 Servo(10) = 100 Waitms 500 Gerade: If A = 10 Then A = 1 Servo(1) = 100 Servo(2) = 115 ......................







 
			
			 
					
					
					
						 Zitieren
Zitieren

Lesezeichen