
Building C#.Radar.Project with Components and Software Integration
Explore how to develop a C# radar project using components like MSP430, HC-SR04 ultrasonic range sensor, 28BYJ-48 stepper motor, jumper cables, and breadboard. Learn how to utilize software libraries for plotting values, modify libraries for custom needs, manipulate stepper motors, and manage serial communication. Enhance your coding skills and project implementation through this detailed guide.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
C# RADAR PROJECT YAKUP ZDEM R 2010514054
COMPONENTS MSP430 HC-SR04 ULTRASONIC RANGE SENSOR 28BYJ-48 STEPPER MOTOR JUMPER CABLES BREADBOARD
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 28BYJ-48. www.instructables.com/id/BYJ48-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 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.Forms.Form f = System.Windows.Forms.Application.OpenForms[ Form1 ]; 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. 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 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 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 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.com/2013/01/msp430-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/7ewkcdb3%28v=vs.110%29.aspx http://www.youtube.com/watch?v=7xCVSWVLRKg http://www.codeproject.com/Articles/32836/A-simple-C-library-for-graph-plotting http://www.instructables.com/id/BYJ48-Stepper-Motor/?ALLSTEPS