Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
circuito.io team
Published © GPL3+

Running Breadboard

This is a great toy for your pets (if they are gentle) or just as a nice toy to have around the office or home.

IntermediateShowcase (no instructions)6 hours3,885

Things used in this project

Hardware components

SparkFun Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)
×1
SparkFun 9V Alkaline Battery
×1
SparkFun N-Channel MOSFET 60V 30A
×1
SparkFun FTDI Basic Breakout - 5V
SparkFun FTDI Basic Breakout - 5V
×1
SparkFun Jumper Wires - Connected 6" (M/F, 20 pack)
×1
Arduino Pro Mini 328 - 5V/16MHz
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
SparkFun Diode Rectifier - 1A 50V
×1
SparkFun 9V Snap Connector
×1
SparkFun Resistor 10k Ohm 1/6th Watt PTH
×1
SparkFun Breadboard - Full-Size (Bare)
×1
SparkFun Hobby Motor - Gear
×1
SparkFun USB Mini-B Cable - 6 Foot
×1
SparkFun Ultrasonic Range Finder - LV-MaxSonar-EZ1
×1

Software apps and online services

circuito.io
circuito.io
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
For the legs we used PCTPE which is a flexible printing material, so that the legs could move more freely.

Story

Read more

Custom parts and enclosures

Engine holder

Weight

Legs

For the legs we used PCTPE which is a flexible printing material, so that the legs could move more freely

Schematics

running breadboard schematics

Code

Running Breadboard

Arduino
Replace the code you received in the circuito.io reply with the attached code.
No preview (download only).

Code for running breadboard

Arduino
in order for this code to work, first download the code from circuito.io as explained in the tutorial, then replace the void setup () and void loop () in the firmware tab of the original code with the code below. Leave the other tabs of the code untouched.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::                                                                ::
::          Copy and paste this code in the firmware.ino          ::
::            tab in the code you got from circuito.io            ::
::                                                                ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

void setup()
{
  // Setup Serial which is useful for debugging
  // Use the Serial Monitor to view printed messages
  Serial.begin(9600);
  while (!Serial) ; // wait for serial port to connect. Needed for native USB
  Serial.println("start");



}

// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()
{
  if (//Get distance measurement in cm. see also ultraSonic.getInches()
    ultraSonic.getCms() < 30)  {
    // The DC motor will turn on and off for 4000ms (4 sec)
    dcMotor.on(200);                        // 1. turns on
    delay(4000);                             // 2. waits 4000 milliseconds (4 sec). change the value in the brackets (4000) for a longer or shorter delay.
    dcMotor.off();                       // 3. turns off
    delay(1000);                             // 4. waits 4000 milliseconds (4 sec). change the value in the brackets (4000) for a longer or shorter delay.
  }
}

/*******************************************************

     Circuito.io is an automatic generator of schematics and code for off
     the shelf hardware combinations.

     Copyright (C) 2016 Roboplan Technologies Ltd.

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

     In addition, and without limitation, to the disclaimers of warranties
     stated above and in the GNU General Public License version 3 (or any
     later version), Roboplan Technologies Ltd. ("Roboplan") offers this
     program subject to the following warranty disclaimers and by using
     this program you acknowledge and agree to the following:
     THIS PROGRAM IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS, AND
     WITHOUT WARRANTIES OF ANY KIND EITHER EXPRESS OR IMPLIED.  ROBOPLAN
     HEREBY DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
     NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS
     FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND THOSE ARISING BY
     STATUTE OR FROM A COURSE OF DEALING OR USAGE OF TRADE.
     YOUR RELIANCE ON, OR USE OF THIS PROGRAM IS AT YOUR SOLE RISK.
     ROBOPLAN DOES NOT GUARANTEE THAT THE PROGRAM WILL BE FREE OF, OR NOT
     SUSCEPTIBLE TO, BUGS, SECURITY BREACHES, OR VIRUSES. ROBOPLAN DOES
     NOT WARRANT THAT YOUR USE OF THE PROGRAM, INCLUDING PURSUANT TO
     SCHEMATICS, INSTRUCTIONS OR RECOMMENDATIONS OF ROBOPLAN, WILL BE SAFE
     FOR PERSONAL USE OR FOR PRODUCTION OR COMMERCIAL USE, WILL NOT
     VIOLATE ANY THIRD PARTY RIGHTS, WILL PROVIDE THE INTENDED OR DESIRED
     RESULTS, OR OPERATE AS YOU INTENDED OR AS MAY BE INDICATED BY ROBOPLAN.
     YOU HEREBY WAIVE, AGREE NOT TO ASSERT AGAINST, AND RELEASE ROBOPLAN,
     ITS LICENSORS AND AFFILIATES FROM, ANY CLAIMS IN CONNECTION WITH ANY OF
     THE ABOVE.
********************************************************/

Credits

circuito.io team

circuito.io team

29 projects • 601 followers
Circuito.io is an online platform that generates wiring and code for Arduino projects. Want to know more? Visit http://circuito.io

Comments