Zalohy z 24. schuzky.
This commit is contained in:
1 parent
518a80f674
commit
0072ff5720
12 files changed
+32
-2
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -120,8 +120,8 @@ void go_forward(unsigned char speed_val) // speed_val:0~255
|
||||
digitalWrite(pinRF,LOW);
|
||||
digitalWrite(pinLB,HIGH);
|
||||
digitalWrite(pinLF,LOW);
|
||||
analogWrite(Lpwm_pin,speed_val+6);
|
||||
analogWrite(Rpwm_pin,speed_val+5);
|
||||
analogWrite(Lpwm_pin,speed_val+5);
|
||||
analogWrite(Rpwm_pin,speed_val+8);
|
||||
|
||||
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,30 @@
|
||||
int pinG = 13;
|
||||
int pinY = 12;
|
||||
int pinR = 11;
|
||||
|
||||
int pinB = 2;
|
||||
|
||||
int hodnota = HIGH;
|
||||
const OFF = HIGH;
|
||||
const ON = LOW;
|
||||
|
||||
void setup() {
|
||||
pinMode (pinG, OUTPUT);
|
||||
pinMode (pinY, OUTPUT);
|
||||
pinMode (pinR, OUTPUT);
|
||||
|
||||
pinMode (pinB, INPUT);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
}
|
||||
|
||||
void loop(){
|
||||
hodnota = digitalRead(pinB);
|
||||
Serial.println(hodnota);
|
||||
if (hodnota == ON){
|
||||
digitalWrite(pinG, HIGH);
|
||||
delay(500);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user