Noob Question about Arduino n Visual C++

Hi there, i am a programmer of C++ and Java and wanna jump into Hardware programming. I have searched web and heard alot about Arduino. Can anybody please guide me about these following points

  1. Can i control home electricity using Adruino?
  2. Can i program Adruino in Visual C++?
  3. Can i attach a barcode scanner with Adruino?
  4. Can i easily get data from Sensors using Adruino?
  5. What is the most basic Adruino development kit you would recommend for above things?

BTW this is one kit i have found so far

Waiting for your kind reply :slight_smile:

  1. Absolutely. The arduino is really flexible, and you could probably do it with relays or something.
  2. Sort of. The arduino uses C, but you could interface it with serial to a program on your computer.
  3. Yes. Although I don't know if know if the arduino has enough processing power to analyze it.
  4. Definitely.
    Arduino Playground - InterfacingWithHardware
  5. I guess if you're new to electronics, then the kit you found would be nice. Add a few servos and motors and you can make something cool really fast.

thank you for your reply. :slight_smile:

I really do program in Visual Studio so i was thinking if i can easily program this kit in .NET IDE ?? I am preferring .NET IDE because i already have lots of projects built in Visual C++ which i want to integrate with this KIT, so if its possible i can do that easily. I mean if i can get API for this KIT and can use the same functions like DigitalWrite(x,y) in .NET IDE, it will be fantastic. Any ideas about this??

Any ideas about this??

Yes, won't work. You can only create programs that run on the Arduino using the Arduino IDE or using command line programs that run AVR-gcc, AVRDUDE, etc.

You can use your Visual C++ to create PC based programs that will communicate with your Aduino using a comm port as the interface.

Lefty

BTW here is something about .NET STUDIO in arduino World

http://www.arduino.cc/playground/Code/VisualStudio

OK, but it sounds like it just allows Visual C++ IDE to act like a shell/wrapper to then run the regular Arduino tools. That sounds like a kind of Rube Goldberg set-up, but what do I know I'm a hardware guy. :wink:

Lefty

infact what i m trying to do is , i want to get the input from the Arduino in my Visual C++ program, so thinking of if it is possible or not?

Yes, rig your Visual C++ app to read from the serial port your arduino is on and away you go.

It does not matter in what language you write your PC-based code, as long as it communicates with arduino on the serial port.
See the playground:
http://www.arduino.cc/playground/Main/InterfacingWithSoftware

waoo thats a nice bit of information. I ll try and post my feedback, thanks for the link :slight_smile:

Getting the Arduino to control household electricity is very easy, the only problem is running the wires if you plan on making it a permanent install.

It sounds like you have a very specific project in mind, care to share with the group?

ya sure why not.
i am planning to control some Electric LAMPS in my room using Arduino, so that i can create different profiles, etc Movie,Good Night, Morning etc, in each case the lamp brightness is changed according to the profiles, for example in case of "Good Night", the lamps will go dim etc.

The lamps are not connected to electric supply, they just use 110V power to get lighten up which i am planning to get from Arduino somehow.

BTW those profiles can be buttons in a windows Software or a Mac App
Any thoughts on this?? I dont know where to start

Install 5 or 6 led's on the ardunio and get them to turn on and off. If you can get it to interface with a serial port pc (what ever program you want on the pc). you should have the maps set on the pc.

going from led to real voltage lighting is as simple as installing a transistor and a relay. im not sure how to handle the dimming, you may need to buy diffrent hardware.

thanks for the reply.

Can you please forward me to some tutorial that deals with this Serial Port and PC program communication? I have read quite some topics on this forum as well but still cant get the desired one.

I only know how to output to the serial port via VB. Inputting into the arduino is the same as a Serial.read.

Can you please provide me with some sample on how to output to serial port of Arduino using VB?

Includes a rather trivial example of outputting to a serial port from VBE...

How do you attach files to a post? I'll upload my vb 2008 module for com ports. if you have any clue about vb you should be able to use it.

you can post the code here, instead of attaching the files.

i think u can upload the file somewhere and then post that link over here, even i m also new here so dont know much about the forum.

VB code is more than text, and rather defies posting in a text-based forum :frowning: