and actually, my teacher isn't helping with this because it is a bonus project that im doing independently! I am an honest student and I never asked you guys to write the code for me! I just needed help with instructions cuz most online resources unfortunately only talk about interfacing via firmatta or are not using vb.net!
ok so if i have a code like:
"int ledPin = 13; // the number of the LED pin
void setup() {
Serial.begin(9600); // set serial speed
pinMode(ledPin, OUTPUT); // set LED as output
digitalWrite(ledPin, LOW); //turn off LED
}
void loop(){
while (Serial.available() == 0); // do nothing if nothing sent
int val = Serial.read() - '0'; // deduct ascii value of '0' to find numeric value of sent number
if (val == 1) { // test for command 1 then turn on LED
Serial.println("LED on");
digitalWrite(ledPin, HIGH); // turn on LED
}
else if (val == 0) // test for command 0 then turn off LED
{
Serial.println("LED OFF");
digitalWrite(ledPin, LOW); // turn off LED
}
else // if not one of above command, do nothing
{
//val = val;
}
Serial.println(val);
Serial.flush(); // clear serial port
}
how do I change the syntax into vb.net??

New Topic/Question
Reply




MultiQuote





|