C RADAR PROJECT YAKUP ZDEMR 2010514054 COMPONENTS MSP

  • Slides: 10
Download presentation
C# RADAR PROJECT YAKUP ÖZDEMİR 2010514054

C# RADAR PROJECT YAKUP ÖZDEMİR 2010514054

COMPONENTS • MSP 430 • HC-SR 04 ULTRASONIC RANGE SENSOR • 28 BYJ-48 STEPPER

COMPONENTS • MSP 430 • HC-SR 04 ULTRASONIC RANGE SENSOR • 28 BYJ-48 STEPPER MOTOR • JUMPER CABLES • BREADBOARD

SOFTWARE • I used a simple C# library for plotting the values read from

SOFTWARE • I used a simple C# library for plotting the values read from the ultrasonic sensor. Here is the link; www. codeproject. com/Articles/32836/A-simple-C-library-for-graph-plotting • I used the library below in order to rotate my stepper motor since original stepper library in Energia can not be applied to 28 BYJ-48. www. instructables. com/id/BYJ 48 -Stepper-Motor/? ALLSTEPS • For coding, i used Energia IDE and Microsoft Visual Studio

I made some changes in library in order to succeed my task. For example,

I made some changes in library in order to succeed my task. For example, i needed to change the graph according to my needs such that i wanted to plot distance that is read in the first form. System. Windows. Form f = System. Windows. Forms. Application. Open. Forms[ ‘’Form 1’’]; gives me the oppurtunity to access variables in the other forms so that i will be able to use variables in the listbox. In order to use a library in your code, namespaces must be the same.

Using the System. IO. Ports; gives us the oppurtunity to get port names easily.

Using the System. IO. Ports; gives us the oppurtunity to get port names easily. Port names are transfered into the combobox. In the button click event, timer has started and if port is not open, i tried to open and set some necessary values such as baud rate.

In the disconnect button event, i stopped the timer and close the port. In

In the disconnect button event, i stopped the timer and close the port. In the keydown event of the textbox, the only expected button is ‘Enter’ to write the value to the port. The reason why I substitue 9 from the original value is because of setting the speed of the motor.

In timer tick event, i read the values written by the sensor and transfer

In timer tick event, i read the values written by the sensor and transfer them into an array named ‘rng’ in order to plot the graph of the values.

This is the library that i use to rotate my motor. In each case

This is the library that i use to rotate my motor. In each case motor’s coils are trigged with an order. In order to prevent cable mess, i had to rotate motor in counter clockwise as well. Serial communication is the most significant topic in my project.

REFERENCES • • • http: //www. rhyous. com/2010/06/18/how-to-limit-or-prevent-characters-in-a-textbox-in-csharp/ http: //stackoverflow. com/questions/5348844/how-to-convert-a-string-to-ascii http: //www. cagatayodabasi.

REFERENCES • • • http: //www. rhyous. com/2010/06/18/how-to-limit-or-prevent-characters-in-a-textbox-in-csharp/ http: //stackoverflow. com/questions/5348844/how-to-convert-a-string-to-ascii http: //www. cagatayodabasi. com/2013/01/msp 430 -launchpad-bilgisayar-kontrollu. html http: //energia. nu/Map. html http: //www. rhyous. com/2010/06/18/how-to-limit-or-prevent-characters-in-a-textbox-in-csharp/ http: //msdn. microsoft. com/en-us/library/7 ewkcdb 3%28 v=vs. 110%29. aspx http: //www. youtube. com/watch? v=7 x. CVSWVLRKg http: //www. codeproject. com/Articles/32836/A-simple-C-library-for-graph-plotting http: //www. instructables. com/id/BYJ 48 -Stepper-Motor/? ALLSTEPS

QUESTIONS

QUESTIONS