λιπων απ το καλοκαιρι ασχλουμε με το arduino
και προσφατα ειδα καπια βιντεο με την c# και με την c++ κι μου καθετε καλυτερα στο ματι η c#
και θελω να μου πεις κατι αυτο ειναι πιο φιλικο για καπιον που ερχετε απο την γλωσσα του arduino
Κώδικας:
this->components = (gcnew System::ComponentModel::Container()); this->serialPort1 = (gcnew System::IO::Ports::SerialPort(this->components));
this->button1 = (gcnew System::Windows::Forms::Button());
this->label2 = (gcnew System::Windows::Forms::Label());
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->button2 = (gcnew System::Windows::Forms::Button());
this->label5 = (gcnew System::Windows::Forms::Label());
this->listBox1 = (gcnew System::Windows::Forms::ListBox());
this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
ή αυτο :
Κώδικας:
progressBar2.Value = 100; trackBar1.Value = 100;
label5.Text = "100";
serialPort1.WriteLine("fan");
serialPort1.WriteLine("100");
Κώδικας:
// the setup function runs once when you press reset or power the board
voidsetup(){
// initialize digital pin 13 as an output.
pinMode(13,OUTPUT);
}
// the loop function runs over and over again forever
voidloop(){
digitalWrite(13,HIGH);// turn the LED on (HIGH is the voltage level)
delay(1000);// wait for a second
digitalWrite(13,LOW);// turn the LED off by making the voltage LOW
delay(1000);// wait for a second
}