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

About: 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 wide range of sensors you can use with it. I ma...

Intro: 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

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! Arduinosensors.nl

Follow me on youtube!

Source on GitHub

Share

    Recommendations

    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest

    6 Discussions

    0
    None
    ChandraN10

    8 months ago

    Help me, in arduino program error "redefinition of 'void setup' ", why?

    1 reply
    0
    None
    ChandraN10ChandraN10

    Reply 8 months ago

    Help me, in arduino program error "redefinition of 'void setup' ", why?

    Capture.JPG
    0
    None
    WATenBrink

    1 year ago

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

    2 replies
    0
    None
    vandenbrandeWATenBrink

    Reply 1 year ago

    https://github.com/vandenbrande/LM35-Temperature-sensor-C-Application-arduino