We uploaded the following videos on our feed:
- Sliding switch to light up the LEDs when we open the instructions book.
- Testing the code for the loading LEDs of the Magic 8 Ball.
We wrote the code (working) for the loading LEDs of the ball :
const int touchPin = 33;
const int redPin = 13;
const int bluePin = 2;
const int greenPin = 15;
void setup() {
pinMode(touchPin, INPUT);
pinMode(redPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(greenPin, OUTPUT);
digitalWrite(redPin, LOW);
digitalWrite(bluePin, LOW);
digitalWrite(greenPin, LOW);
Serial.begin(115200);
}
void loop() {
int touchValue = touchRead(touchPin);
if (touchValue < 1000) {
}
}
void sequentialLEDs() {
digitalWrite(redPin, HIGH);
delay(500);
digitalWrite(redPin, LOW);
digitalWrite(bluePin, HIGH);
delay(500);
digitalWrite(bluePin, LOW);
digitalWrite(greenPin, HIGH);
delay(500);
digitalWrite(greenPin, LOW);
}
As a reminder, it will be used when the answer to the question asked by the user will be uploading, symbolised by the lights lighting up in a row.
We also looked for the materials that we don't have yet, such as the ball, the magnets, etc. Everything that isn't electronic.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.