Presentation is loading. Please wait.

Presentation is loading. Please wait.

C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO KAAN EREN

Similar presentations


Presentation on theme: "C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO KAAN EREN"— Presentation transcript:

1 C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO 2012514503 KAAN EREN

2 SENSOR ARDUINO SERIAL COMMINUCATION VISUAL STUDIO C# COMPUTER CONTROL

3 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#.

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

5 EQUIPMENT

6 EQUIPMENT LM35 TEMPERATURE SENSOR HC-SR04 ULTRASONIC SENSOR 3x LED

7 ARDUINO

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

9 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

10 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. analogRead() ; Reads the value from the specified analog pin. Serial.avaiable(); Get the number of bytes (characters) available for reading from the serial port.

11 ARDUINO Serial.read(); Reads incoming serial data.
Serial.printIn(); Prints data to the serial port digitalWrite(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)

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

13 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.

14 C# DESİGN

15 SerialPort(); Initializes a new instance of the SerialPort class.
C# CODE SerialPort(); Initializes a new instance of the SerialPort class. SerialPort.GetPortNames() Gets an array of serial port names for the current computer.

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

17 C# CODE If we click button connect ,timer and serial comminucation begin. serialComport.BaudRate; Gets or sets the serial baud rate. serialComport.Open(); open serial comminucaiton. serialComport.PortName Write the port name combobox.

18 C# CODE

19 C# CODE Timer set interval to generate recurring events. serialComport.WriteLine() ; Writes data to the serial port. Chart1.Series[‘’Series1’’].Points.AddY(); show the temperature in graph

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

21 REFERENCES http://arduinoturkiye.com/arduino-c-net-haberlesmesi/


Download ppt "C# SERIAL COMMUNICATION TEMPERATURE CONTROL WITH ARDUINO KAAN EREN"

Similar presentations


Ads by Google