C SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO 2012514503

  • Slides: 21
Download presentation
C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO 2012514503 KAAN EREN

C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO 2012514503 KAAN EREN

SENSOR ARDUINO VISUAL STUDIO C# CONTROL SERIAL COMMINUCATION COMPUTER

SENSOR ARDUINO VISUAL STUDIO C# CONTROL SERIAL COMMINUCATION COMPUTER

 • WE MEASUREMENT THE SIGNAL OF THE SENSOR AND READ FOR ARDUINO. •

• WE MEASUREMENT THE SIGNAL OF THE SENSOR AND READ FOR ARDUINO. • ARDUINO HAS CONNECTED COMPUTER VIA SERIAL COMPORT. • C# CONNECT ARDUINO AFTER WE READ THE SIGNAL AND CALCULATED TEMPERATURE AND INTERVAL VALUE. • THEN WE SHOW THE TEMPERATURE AND INTERVAL VALUE OF THE C#.

EQUIPMENT Arduino is an open-source prototyping platform based on easy-to-use hardware and software. This

EQUIPMENT Arduino is an open-source prototyping platform based on easy-to-use hardware and software. This project I use the arduino uno board.

EQUIPMENT

EQUIPMENT

EQUIPMENT LM 35 TEMPERATURE SENSOR HC-SR 04 ULTRASONIC SENSOR 3 x LED

EQUIPMENT LM 35 TEMPERATURE SENSOR HC-SR 04 ULTRASONIC SENSOR 3 x LED

ARDUINO

ARDUINO

ARDUINO Thats part I initialize the value and identify what we use inculude part

ARDUINO Thats part I initialize the value and identify what we use inculude part of same using system.

ARDUINO The setup() function is called when a sketch starts. Use it to initialize

ARDUINO The setup() function is called when a sketch starts. Use it to initialize variables, pin modes, start using libraries. The setup function will only run once, after each powerup or reset of the Arduino board. I defined output and input pin for arduino. Serial. begin(9600), opens serial port, sets data rate to 9600 bps

ARDUINO After creating a setup() function, which initializes and sets the initial values, the

ARDUINO After creating a setup() function, which initializes and sets the initial values, the loop() function does precisely what its name suggests, and loops consecutively, allowing your program to change and respond. Use it to actively control the Arduino board. analog. Read() ; Reads the value from the specified analog pin. Serial. avaiable(); Get the number of bytes (characters) available for reading from the serial port.

ARDUINO Serial. read(); Reads incoming serial data. Serial. print. In(); Prints data to the

ARDUINO Serial. read(); Reads incoming serial data. Serial. print. In(); Prints data to the serial port digital. Write(pinnumber, HIGH or LOW); Write a HIGH or a LOW value to a digital pin. Delay(); Wait the program for the amount of time (in miliseconds)

C# DESİGNER This section was designed for user input.

C# DESİGNER This section was designed for user input.

C# DESİGN Defined initial values for the user name and password. Program check the

C# DESİGN Defined initial values for the user name and password. Program check the user name and password if statement. If you wrong user name and password , you show the messagebox there is a error.

C# DESİGN

C# DESİGN

C# CODE Serial. Port(); Initializes a new instance of the Serial. Port class. Serial.

C# CODE Serial. Port(); Initializes a new instance of the Serial. Port class. Serial. Port. Get. Port. Names() Gets an array of serial port names for the current computer.

C# CODE This two method, I read and take value of arduino and the

C# CODE This two method, I read and take value of arduino and the convert electric signal to degree and centimetre unit.

C# CODE If we click button connect , timer and serial comminucation begin. serial.

C# CODE If we click button connect , timer and serial comminucation begin. serial. Comport. Baud. Rate; Gets or sets the serial baud rate. serial. Comport. Open(); open serial comminucaiton. serial. Comport. Port. Name Write the port name combobox.

C# CODE

C# CODE

C# CODE Timer set interval to generate recurring events. serial. Comport. Write. Line( )

C# CODE Timer set interval to generate recurring events. serial. Comport. Write. Line( ) ; Writes data to the serial port. Chart 1. Series[‘’Series 1’’]. Points. Add. Y(); show the temperature in graph

C# CODE Control statement temperature and lamp. Forexample if temperature bigger than threetysix, write

C# CODE Control statement temperature and lamp. Forexample if temperature bigger than threetysix, write serialcomport 1 and redlamp active the other lamp visible false.

REFERENCES http: //arduinoturkiye. com/arduino-c-net-haberlesmesi/ http: //elektrikelektronikprojeleri. blogspot. com. tr/ http: //mvaslan. blogspot. com. tr/

REFERENCES http: //arduinoturkiye. com/arduino-c-net-haberlesmesi/ http: //elektrikelektronikprojeleri. blogspot. com. tr/ http: //mvaslan. blogspot. com. tr/ http: //playground. arduino. cc/Csharp/Serial. Comms. CSharp http: //www. depositericrobotic. com http: //www. electrocorner. net/ https: //msdn. microsoft. com/ http: //www. darreningram. net/c-serial-communication-witharduino/ https: //www. arduino. cc/ http: //www. depositericrobotic. com/