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 how make time depend
  • 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 5 replies
  • Answers 1 answer
  • Subscribers 393 subscribers
  • Views 520 views
  • Users 0 members are here
Related

how make time depend

Former Member
Former Member over 9 years ago

Hi there, my frist post, on e14 community (just to you know, im a nurse in a nursing home, have some experience in arduino, (copy/past coding, and i have an quadcopter based in the Ardupilot)

Now my problem, i have an pacient with Alzheimer disease, that fall asleep in the toilet, some times more than an hour, i want to use an HC-SR04 range finder to make a simple task: (a detail the toilet is used by other that use regularly the toilet)

Scanning distance to target (person sit on toilet)

IF is less to 50cm AND for more than 10min

Activate LED

Activate a Servo ( to pull the emergency bell)

Loop

Now im trying to learn the code, and i understand the code for range findings, and millis (to time), but i didint get the way to make the statemant IF => 50 && 6000sec

Cant see a way to create the code

image

I hope you help me

  • Sign in to reply
  • Cancel

Top Replies

  • jw0752
    jw0752 over 9 years ago +1 suggested
    Hi Jorge, Sorry I can't answer your specific question but I will throw out an idea anyway. The bathroom in the nursing home where my mother is a resident has a sensor for the light switch. When someone…
  • jw0752
    jw0752 over 9 years ago +1
    Are you in a location where they will let you interface and modify nursing home electronic systems? This has been a problem for me as I have attempted to help my mother in her situation with adaptive technology…
Parents
  • jw0752
    0 jw0752 over 9 years ago

    Are you in a location where they will let you interface and modify nursing home electronic systems? This has been a problem for me as I have attempted to help my mother in her situation with adaptive technology. All my improvements have to be isolated from the actual nursing home systems.

     

    John

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • jw0752
    0 jw0752 over 9 years ago

    Are you in a location where they will let you interface and modify nursing home electronic systems? This has been a problem for me as I have attempted to help my mother in her situation with adaptive technology. All my improvements have to be isolated from the actual nursing home systems.

     

    John

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Former Member
    0 Former Member over 9 years ago in reply to jw0752

    Indeed, my only "connection" with the actual equipment will be and Servo with an U shape that will "simulate" someone to pull the security coord that runs all the WC and triggers the WC alarm. And that will exist if the pacient wont respond to light and sound.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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