Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Parking Sensor


  • Please log in to reply
2 replies to this topic

#1 ZakieM

ZakieM

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • LocationIsrael

Posted 28 April 2011 - 03:13 PM

Attached File  Parking Sensor.zip   12.75KB   33 downloadsGetting into my parking space is a bit of a challenge. I always fear of the gate that closes to hit the back of the car... so I decided to build a fixed parking sensor as my car has only back sensors. I used the Netuindo and MaxSonar sensor (http://www.maxbotix....r-EZ1__FAQ.html).
Originally I thought of Muxing the LEDs that represents distance from wall so program is written to use two threads: One for LED display and another for the logic in reading data from sensor. Fairly simple one but useful.

Attached Files


Zakie Mashiah
Just a curious guy

#2 Michel Trahan

Michel Trahan

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts

Posted 28 April 2011 - 04:03 PM

Add a yellow for the right position you want (hardcoded since no interface) and a red when you go beyond the right position. That would be a perfect solution. (human factor specialist in me had to comment) Besides that good work and Welcome to the community :)
Started with C in 1985, moved to Vb3 ... to vb6 and stopped. Now started with .Net and learning C# and VB.net and wishing VB.net was on MF !

#3 Jim Wells

Jim Wells

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationOrlando FL

Posted 28 April 2011 - 04:52 PM

I did the same thing with on of those PING ultrasonic sensors in my garage, I have 2 bright lights, one blue for when the car trips the sensor and a red that goes solid when within 2 feet of the wall and blinking within 1 foot. Mine was actually done with Arduino before I got hooked on Netduino's so good job doing it all in managed code. I am impressed with your code, nice use of comments and I like your implementation of Main, it's structured very well. For the most part everything is very readable but I (take it for what it's worth) don't like you’re use of the variable displayLedLevels. If it were me I may have used a enum to define the Ledlevels or a simple int and matched that int to the OutputPort[] Leds with a for loop or something. It's just constructive criticism to make the code a little more readable and scalable. Overall, good code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.