Here are the steps: Picture 1) Create a new project Picture 2) Choose "Windows Form Application" & Name it what you want Picture 3) This is what you should have Picture 4) Find the button in the Toolbox Picture 5) Get 2 buttons & drag them to the window Picture 6) Left click on the first one. Under properties, go to title & rename it "On" Picture 7) Rename the second button & resize the window Picture 8) Select both of the buttons & double click them to create methods for them Picture 9) Paste in the code attached below C# with Arduino from OZHAN on Vimeo. |
/* bu kodlar Arduino Duemilanove için */ /* codes for Arduino Duemilanove */ int Led = 13; int PwmLed = 11; int Csharp; void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps pinMode(Led, OUTPUT); } void loop() { if (Serial.available() > 0) { Csharp = Serial.read(); Serial.println(Csharp, DEC); analogWrite(PwmLed, Csharp); } } http://www.ozhan.org/index.php?kat_id=19#Arduino Sugestions - Make it so there are two buttons that control a servo's rotation - Make a small piano - Make a physical output for your mac - Make a pan & tilt webcam |