arduino core

parent ed421e92
Pipeline #76899 passed with stage
in 12 seconds
int led1=7;
void setup() {
// put your setup code here, to run once:
pinMode(led1,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led1,HIGH);
delay(3500);
digitalWrite(led1,LOW);
delay(2000);
}
int led1=7;
int button=3;
int state;
void setup() {
// put your setup code here, to run once:
pinMode(led1,OUTPUT);
pinMode(button,INPUT);
}
void loop() {
state=digitalRead(button);
if(state==HIGH){
digitalWrite(led1,LOW);
}
else{
digitalWrite(led1,HIGH);
}
}
const int button = 3;
const int led1 = 7;
int buttonPushCounter = 0;
int buttonState = 0;
int lastButtonState = 0;
void setup() {
pinMode(led1,OUTPUT);
pinMode(button,INPUT);
}
void loop() {
buttonState = digitalRead(button);
if (buttonState != lastButtonState) {
if (buttonState == HIGH) {
buttonPushCounter++;
}
else {
}
}
lastButtonState = buttonState;
if (buttonPushCounter % 4 == 0) {
digitalWrite(led1, HIGH);
} else {
digitalWrite(led1, LOW);
}
}
......@@ -142,28 +142,18 @@ void loop() {
}</pre></code>
<h4>Configuration and Upload</h4>
Working.
</p>
<!-- <p>
<p>
<h2>Download files</h2>
You can donwload this files Here (Inventor 2017): <br>
Base<br>
<a href="images/week8/base.ipt" download>Base</a><br>
<a href="images/week8/front_base.ipt" download>Front base </a><br>
<a href="images/week8/late_base.ipt" download>Lateral base</a><br>
Central.<br>
<a href="images/week8/back_central.ipt" download>Back central part</a><br>
<a href="images/week8/base_central.ipt" download>Base central part</a><br>
<a href="images/week8/lat_central.ipt" download>Lateral central part</a><br>
Final.<br>
<a href="images/week8/base_final.ipt" download>Final base part</a><br>
<a href="images/week8/coupling_back.ipt" download>Coupling back part</a><br>
<a href="images/week8/coupling_lat.ipt" download>Coupling lateral part</a><br>
<a href="images/week8/lat_final.ipt" download>Lateral final part</a><br>
<a href="images/week8/back_final.ipt" download>Back final part</a><br>
You can donwload this files Here: <br>
Arduino Code<br>
<a href="images/week9/blink.ino" download>Blink</a><br>
<a href="images/week9/button.ino" download>Button </a><br>
<a href="images/week9/testbutton.ino" download>Test Button</a><br>
</p>
-->
<p><ul class="actions">
<br/>
<li><a href="index.html" class="button primary">Main Menu</a></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment