arduino uno – Kevin Gulling http://www.kevingulling.com Game Development, VR, and more Mon, 06 Nov 2017 22:46:43 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.13 81085834 12 Days of Arduino Day 12 – Glorious Spambot! – DIY Robot for $50 https://kevingulling.com/2016/12/12-days-of-arduino-day-12-glorious-spambot-robot-for-under-50/ https://kevingulling.com/2016/12/12-days-of-arduino-day-12-glorious-spambot-robot-for-under-50/#comments Sat, 24 Dec 2016 15:34:57 +0000 https://kevingulling.com/?p=1433 Day 12 of 12 Days of Arduino! On the 12th day of Arduino, I present our final project of the series: Glorious Spambot! I printed out some wheels , and fashioned some wheels out of bottle caps, and an axle out of a spray tube, a paperclip and a ballpoint pen. I found the wheel […]

The post 12 Days of Arduino Day 12 – Glorious Spambot! – DIY Robot for $50 appeared first on Kevin Gulling - Game Development, VR, and more.

]]>
spambot day12

Day 12 of 12 Days of Arduino! On the 12th day of Arduino, I present our final project of the series: Glorious Spambot! I printed out some wheels , and fashioned some wheels out of bottle caps, and an axle out of a spray tube, a paperclip and a ballpoint pen. I found the wheel model on Thingiverse. There are a ton of wheels on Thingiverse that will work great, or if you don’t have a 3d printer, I’ve found that plastic bottle caps will do the trick!

Spambot

Watch Spambot on his first official voyage:




Spambot Sketch

#include

#define rxPin 0
#define txPin 1

int motor = 3;
int fan = 5;
int incomingByte[2];
boolean motorBool = false;
boolean fanBool = false;

SoftwareSerial bluetooth(rxPin, txPin);

void setup() {
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode (motor, OUTPUT);
pinMode (fan, OUTPUT);
bluetooth.begin(9600);

analogWrite (motor, 0);
analogWrite (fan, 0);
}

void loop() {
if(bluetooth.available()>0){
while(bluetooth.peek() == 'A'){
//bluetooth.println(bluetooth.peek());
bluetooth.read();
incomingByte[0] = bluetooth.parseInt();
bluetooth.println(incomingByte[0], DEC);
if(incomingByte[0] == 1){
motorBool = true;
bluetooth.print("motor:");
bluetooth.println(motorBool, DEC);
}
else if(incomingByte[0] == 0){
motorBool = false;

}
else if(incomingByte[0] == 2){
fanBool = true;
bluetooth.print("fan:");
bluetooth.println(fanBool, DEC);
}
else if(incomingByte[0] == 3){
fanBool = false;

}
}

while(bluetooth.available()>0){
bluetooth.read();
}
}

if(motorBool == true){
analogWrite (motor, 255);
//bluetooth.print("motor:");
// bluetooth.println(motorBool, DEC);
}
else{
analogWrite (motor, 0);
//bluetooth.print("motor:");
//bluetooth.println(motorBool, DEC);
}
if(fanBool == true){
analogWrite (fan, 255);
//bluetooth.print("fan:");
//bluetooth.println(fanBool, DEC);
}
else{
analogWrite (fan, 0);
//bluetooth.print("fan:");
//bluetooth.println(fanBool, DEC);
}
delay(1000);
}

The code hasn’t changed much from yesterday’s I just commented out some of the debugging stuff.

The mission of GloriousSpambot.org is simple, to create one or many useful, fully functional, open-source designs utilizing recycled and used parts and affordable components such as a Spam can, and to spread the word about it! Most robots on the market are for entertainment purposes, I want to see future iterations of Spambot that can

  • Detect Smoke/Fight Fires
  • Vacuum/Sweep/Dust
  • Monitor Pets/Children
  • Home Security
  • Elderly Care
  • Home Automation
  • Companion, Helper and Friend!
  • That might seem like quite a leap from the current iteration of Spambot, but you all saw what Spambot was 5 days ago: a pile of scraps! The possibilities are endless. By next month, the plan is to have Spambot doing tasks on the PC including making friends on social networks, and playing video games!

    That wraps up my 12 Days of Arduino series but the project will continue at www.GloriousSpamBot.org Make sure you check it out and like/subscribe for updates also follow on Twitter @GloriousSpamBot

    If you want to help out with the project, Tweet a message to @GloriousSpamBot and you will get a reply. For now it will be me, but in the near future Spambot will be in the beginning stages of automation including communicating with humans!

    Edit: it’s only been a little while since the announcement of Spambot, and already quite the following from around the world, over 1500 followers @GloriousSpamBot! Awesome! Thanks for the support everyone 😀 You can also help by clicking over to Youtube in the video above and liking/subscribing! Also thanks to @Nick Gammon for the link to the alternative TIP120 datasheet and @Due_Unto for the expert advice, @JohnLincoln for the link to transistor heatsink mounting kit

    Also to help out make sure you use this link to order components from ICStation. All proceeds will go directly back into development!


    Happy Holidays!

    The post 12 Days of Arduino Day 12 – Glorious Spambot! – DIY Robot for $50 appeared first on Kevin Gulling - Game Development, VR, and more.

    ]]> https://kevingulling.com/2016/12/12-days-of-arduino-day-12-glorious-spambot-robot-for-under-50/feed/ 1 1433 Hello World Arduino Uno R3 Morse Code Sketch – 2016 https://kevingulling.com/2016/11/hello-world-arduino-uno-r3-morse-code-sketch/ Fri, 11 Nov 2016 20:09:39 +0000 https://kevingulling.com/?p=1166 Recently I decided to get started prototyping the VR device I invented back in 2014. I chose to use an Arduino Uno R3 for my micro-controller. I was amazed how easy it was to get started right out of the box! Below is a copy of my first Arduino “Sketch” (they are known as sketches […]

    The post Hello World Arduino Uno R3 Morse Code Sketch – 2016 appeared first on Kevin Gulling - Game Development, VR, and more.

    ]]>

    vlcsnap-2016-11-11-18h44m40s546

    Recently I decided to get started prototyping the VR device I invented back in 2014. I chose to use an Arduino Uno R3 for my micro-controller. I was amazed how easy it was to get started right out of the box!

    Below is a copy of my first Arduino “Sketch” (they are known as sketches rather than programs or scripts), it repeats “hello world” in Morse code.

    This is a very simple way to accomplish this, not necessarily the best way. I don’t store any values or functions which would probably improve the efficiency a little.





    void setup() {
    pinMode(13, OUTPUT);

    }

    void loop() {
    //hello world morse code

    //H
    digitalWrite(13, HIGH); // sets the LED on
    delay(200); // waits for a second
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(200); // waits for a second
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(200); // waits for a second
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(200); // waits for a second

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //E
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //L
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //L
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //O
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);

    //word break
    digitalWrite(13, LOW); // sets the LED off
    delay(1600);

    //W
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //O
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //R
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //L
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);

    //break
    digitalWrite(13, LOW); // sets the LED off
    delay(400);

    //D
    //dah
    digitalWrite(13, HIGH); // sets the LED on
    delay(400);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    digitalWrite(13, LOW); // sets the LED off
    delay(100);
    //dit
    digitalWrite(13, HIGH); // sets the LED on
    delay(200);
    //final break
    digitalWrite(13, LOW); // sets the LED off
    delay(3200);

    }


    morse code cheat sheet

    The post Hello World Arduino Uno R3 Morse Code Sketch – 2016 appeared first on Kevin Gulling - Game Development, VR, and more.

    ]]>
    1166