Day 9 of 12 Days of Arduino! So I couldn’t wait to get our components hooked up to the core, aka the spam can so I jumped ahead of schedule a bit so we can see the robot start to take shape! Don’t worry though, there’s more to this surprise! Make sure you catch Day 10-12, and if you’ve missed it, go back and check out the “Keyduino“.
Parts:
-Arduino Uno R3
-Motor
-Fan
-Jumper Wires
-Breadboard
-Spam Can
-2x TIP120 transistors
int motor = 3;
int fan = 5;
void setup () {
pinMode (motor, OUTPUT);
pinMode (fan, OUTPUT);
}
void loop () {
analogWrite (motor, 255);
digitalWrite (fan, HIGH);
}
This old fan that I scrapped off a GPU from the turn of the millennium has seen better days. It was not responding to anything less than 12v therefor I simply gave it a digitalWrite to HIGH, so I’ll likely be swapping this out in the future, and switching back to pulse width modulation. I’m not sure if there is any difference in digitalWrite() with a value of HIGH and analogWrite() with a value of 255, maybe someone can shout that out to me @KevinGulling and I’ll make an update here.
I know a lot of you have been following along and that’s great! Show your support by giving a like or retweet, it’s highly appreciated 👍🏻 Thanks! Hope you are looking forward to tomorrow, things are starting to get fun aren’t they?
Check out ICStation for low price electronics kits: