HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 10131 Views - Last Post: 28 November 2012 - 09:00 AM Rate Topic: *---- 1 Votes

#16 teejay13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 19-November 12

Re: HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

Posted 28 November 2012 - 08:40 AM

thanks!
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??
Was This Post Helpful? 0
  • +
  • -

#17 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5382
  • View blog
  • Posts: 27,350
  • Joined: 10-May 07

Re: HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

Posted 28 November 2012 - 08:43 AM

So you are an honest student because you didn't ask us to write it for you, but it's ok that you found C code that you can't use, & just want the syntax converted.

Either way you wind up with code you didn't write.
Was This Post Helpful? 0
  • +
  • -

#18 teejay13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 19-November 12

Re: HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

Posted 28 November 2012 - 08:53 AM

View Postno2pencil, on 28 November 2012 - 03:43 PM, said:

So you are an honest student because you didn't ask us to write it for you, but it's ok that you found C code that you can't use, & just want the syntax converted.

Either way you wind up with code you didn't write.

excuse me! Even if I convert this code into vb.net, I still cant use it because it uses a different type of arduino board with different specifications. In addition, This code is a simple basic for one for turning the LED on one single pin. I definitely cant just use it!

I will have to create and compose and test my own code regardless. But, I still need an example for me to know how its supposed to be like.

I NEVER SAID I'LL USE A CODE THAT I DIDNT WRITE!!! PLUS, MY TEACHER HAS A BRAIN AS WELL, AND HE WONT ACCEPT PLAGIARISM.
Was This Post Helpful? 0
  • +
  • -

#19 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9502
  • View blog
  • Posts: 35,850
  • Joined: 12-June 08

Re: HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

Posted 28 November 2012 - 08:54 AM

Quote

cuz most online resources unfortunately only talk about interfacing via firmatta or are not using vb.net!


Okay.. see this should indicate a problem. You are trying to row up stream by using VB.NET already.. then you are trying to buck that trend by not using the generally accepted way of interfacing with arduino (aka firmatta) because it is 'too complicated'.... but what you are doing now is even *MORE* complicated.

End game is - if this is your independent project I would recommend reevaluating your choices.. first - just use the given language for arduino. It's not that hard. Second, if you refuse to do that then spend the day learning firmatta. Third - if you still want to forge ahead then understand this is going to be pretty difficult for a novice and you best change projects.
Was This Post Helpful? 0
  • +
  • -

#20 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5382
  • View blog
  • Posts: 27,350
  • Joined: 10-May 07

Re: HOW TO INTERFACE ARDUINO BOARDS USING VB.NET

Posted 28 November 2012 - 09:00 AM

View Postteejay13, on 28 November 2012 - 10:53 AM, said:

HE WONT ACCEPT PLAGIARISM.

"convert this for me" ... the apple doesn't fall far from the plagiarism tree.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2