element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Please help us with our school project!
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 1 answer
  • Subscribers 395 subscribers
  • Views 699 views
  • Users 0 members are here
  • school project
  • stem
  • arduino uno
  • servo
  • arduino
Related

Please help us with our school project!

Former Member
Former Member over 9 years ago

Soo, we have a school project called 'Explore new tech'. For not so tech people...

 

Task:

We'll make a box of Plexiglas that is linked to an android app. In the app, you can create your own to-do lists. When you checked off the chores listed in the app, the box will open, by means of a lock. In the box, you have already put something you would like to have (a reward).

This can be used by e.g. families - the kids have to clean the room before Saturday to get the candy in the box. When the children checked in the boxes in the list the parents have to approve. Then the box will open and they will get their reward.

 

Technology we use:

- An Arduino Uno

- 9v battery

- HC06 bluetooth

- Breadboard

- Servo motor "Futaba S3003"

- Android app

 

Problem:

- The problem is that we want to connect to Bluetooth - the lamp on the bluetooth is flashing but we can't get any communication between the bluetooth and the phone.

- We have obtained the motor to spin, by means of the code bellow. Then we want to have a button for "open" and one for "close" in our android app. So we have got the motor to spin, but we want to control it with open and close buttons. What code shall we use?!

 

We believe we need to put any "if" or "else" code?!

 

I might add that we spent almost a week to checking tutorials now!

 

Is there anyone here who has the skills to help us?
Thanks in advance!

 

// Sweep

// by BARRAGAN <http://barraganstudio.com>

// This example code is in the public domain.

 

 

#include <Servo.h>

 

Servo myservo; // create servo object to control a servo

// a maximum of eight servo objects can be created

 

int pos = 0; // variable to store the servo position

 

void setup()

{

myservo.attach(9); // attaches the servo on pin 9 to the servo object

}

 

 

void loop()

{

for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees

{ // in steps of 1 degree

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(15); // waits 15ms for the servo to reach the position

 

 

}

for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees

{ 

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(15); // waits 15ms for the servo to reach the position

}

}

  • Sign in to reply
  • Cancel

Top Replies

  • spannerspencer
    spannerspencer over 9 years ago +1
    Wow, great project idea! I don't have any particular advice myself, but let me promote this post around the Community and see if we can get the experts in to have a look
  • tonyboubady
    tonyboubady over 9 years ago +1
    Generally, projects needs hands-on approach, i can't help it without owning the HC-06 bluetooth module which is pre-programmed with serial port profile. If i own one i would have done the project and send…
Parents
  • jack.chaney56
    0 jack.chaney56 over 9 years ago

    Hi, Just saw the posting, and I am always happy to jump into the mix for education.

     

    The described requirements talk of two elements being used. An Arduino to handle the lock on the box, and an Android (or similar) app to enter information.

    The classic mistake at this point is to want both ends to do all the work. Creating the object model of the problem, the lock doesn't need to know all the questions, only if it is open or closed.  The lock can also keep track of stages (completion of a task), like tumblers in a lock. The control of the tumblers can then be provided access by a secured link, like the key of a lock.

     

    By separating the application in question, which would very likely be the Android application and treating the box with a lock it disconnects the components to workable sizes.  The app would keep track of information, and change the questions that need to be solved to gain access. It would also be possible to have multiple inputs for each person in the worker set, for a team effort (everybody needs to complete their task before the box opens).

     

    Need to add some additional comments...

    For the locking mechanism, using a solenoid, actuated latch would probably work better than a servo motor, unless the project lessons specifically cover use of servo motors. The gratifying buzz of the electromagnet opening the lock is very exciting.  Also, a visual confirmation from the box would probably be helpful, red / green LEDs for each of the "tumblers" so progress toward goal is acknowledged.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • jack.chaney56
    0 jack.chaney56 over 9 years ago

    Hi, Just saw the posting, and I am always happy to jump into the mix for education.

     

    The described requirements talk of two elements being used. An Arduino to handle the lock on the box, and an Android (or similar) app to enter information.

    The classic mistake at this point is to want both ends to do all the work. Creating the object model of the problem, the lock doesn't need to know all the questions, only if it is open or closed.  The lock can also keep track of stages (completion of a task), like tumblers in a lock. The control of the tumblers can then be provided access by a secured link, like the key of a lock.

     

    By separating the application in question, which would very likely be the Android application and treating the box with a lock it disconnects the components to workable sizes.  The app would keep track of information, and change the questions that need to be solved to gain access. It would also be possible to have multiple inputs for each person in the worker set, for a team effort (everybody needs to complete their task before the box opens).

     

    Need to add some additional comments...

    For the locking mechanism, using a solenoid, actuated latch would probably work better than a servo motor, unless the project lessons specifically cover use of servo motors. The gratifying buzz of the electromagnet opening the lock is very exciting.  Also, a visual confirmation from the box would probably be helpful, red / green LEDs for each of the "tumblers" so progress toward goal is acknowledged.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube