Introduction: Insert in SQL From Arduino Built in LattePanda With C# App

Picture of Insert in SQL From Arduino Built in LattePanda With C# App

In this tutorial we will see how to send data directly from arduino to sql database through c# application

first start with arduino program

int pushButton1 = 2;
int pushButton2 = 3;

int pushButton3 = 4;

int pushButton4 = 5;

void setup() {

Serial.begin(57600);

pinMode(pushButton1, INPUT_PULLUP);

pinMode(pushButton2, INPUT_PULLUP);

pinMode(pushButton3, INPUT_PULLUP);

pinMode(pushButton4, INPUT_PULLUP);

}

void loop() {

int buttonState1 = digitalRead(pushButton1);

if (buttonState1 == LOW) {

Serial.println("Machine one on");

delay(1000); }

int buttonState2 = digitalRead(pushButton2);

if (buttonState2 == LOW) {

Serial.println("Machine two on");

delay(1000); }

int buttonState3 = digitalRead(pushButton3);

if (buttonState3 == LOW) {

Serial.println("Machine three on");

delay(1000); }

int buttonState4 = digitalRead(pushButton4);

if (buttonState4 == LOW) {

Serial.println("Machine four on");

delay(1000);

}

}

Second C# program in the attached file and last DB also included

you will also fined Arduino library in this files

Best Regards for all

Comments

DIY Hacks and How Tos (author)2016-12-26

Nice instructional video. You might think about about moving it to the top of the Instructable so that viewers can watching before going through the program.

Yes thank you very much

samirso (author)2016-12-24

all files needed in this link below

https://drive.google.com/open?id=0B-4UOKhoBplpY0FqRzZsS3JyTEU

About This Instructable

156views

0favorites

More by samirso:Over 120 Meter Control 8 Channel Relay Module With 433MHz Wireless Transmitter and Receiver Access Control With 2 Wiegand Reader Arduino Uno and Magnetic Lock Multi Card Recorded Arduino Uno and RFID Access Control With Relay Module
Add instructable to: