Introduction: Arduino & C# - LM35 Temperature Sensor C# Application Arduino (OPEN SOURCE)

Picture of Arduino & C# - LM35 Temperature Sensor C# Application Arduino (OPEN SOURCE)

Hello world! Today i made a Windows C# Application to read the temperature from a LM35 Temperature sensor.
The source is open to modify and included in the instructable downloads. The code is very simple and can read any sensor data written from arduino to serial, in this case Serial.println(tempC,1); If you want to use fahrenheit just uncomment the arduino part in the code Serial.println(tempF,1); You should now see fahrenheit without doing anything in the C# App. So, If you want to use another Arduino code that belongs to another Sensor all you need to do is print the value to serial and the app will read it. You might need to change the C# application a bit to fit the sensor data.

Files you modify in the C# source are the following. Form1.cs & Form.1Designer.cs To modify the look of the Application you simply double click on Form1.cs and the Form1.cs [Design] should pop up. You can now drag and drop buttons and whatever you want from the toolbox, and change background in the properties etc. If adding a button for example, double click the button to give it a function, Double clicking it will bring you to the part of the code that belongs to the button.

You can also change the about box by double clicking on the about box AboutBox1.cs, You can change background, font, colors etc. To change company name, version etc. you can double click Properties in the [solution explorer]. And then at [application] click on [assembly information], you can also modify AssemblyInfo.cs directly.

Follow the next step for the Schematic, arduino code, Parts list and C# source codes.

Step 1: Schematic, Arduino Code, Parts List & C# Source

Picture of Schematic, Arduino Code, Parts List & C# Source

Just wire it up like the schematic which is very easy as you can see and upload the code.

Parts list.

  1. Arduino uno
  2. LM35 Temperature sensor.
  3. Jumper wires.
  4. Breadboard (optional).
  5. Windows Application.
  6. Visual Studio (for modifying the Application, not needed there is a pre-build application) (optional)

Good luck!

Buy sensors here!

Follow me on youtube!

Source on GitHub


WATenBrink (author)2017-07-19

Where's the C# Source in the download? All i see is a solution file and an executable...

vandenbrande (author)WATenBrink2017-07-20

vandenbrande (author)WATenBrink2017-07-20

Fixed it

vandenbrande (author)2017-07-18

Follow me for more!

About This Instructable




Bio: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the ... More »
More by vandenbrande:Arduino & C# - RGB LED / LED STRIP CONTROL C# Application Arduino & C# - LM35 Temperature Sensor C# Application Arduino (OPEN SOURCE) Arduino & C# - HC SR04 Distance Meter C# App for Arduino
Add instructable to: