It is an educational technical channel, interested in the field of electronics and the Internet of things in general, through which I explain, review and review what is related to embedded systems
هي قناة تقنية تعليمية, تهتم بمجال الالكترونكس و انترنت الاشياء بشكل عام وأقوم من خلالها بشرح واستعراض ومراجعة ما يتعلق بالأنظمة المدمجة
code (1) #include <Servo.h> Servo myservo; void setup() { myservo.attach(9); } void loop() { myservo.write(90); } code (2) #include <Servo.h> Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } } code (3) #include <Servo.h> Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position void setup() { pinMode(2, INPUT_PULLUP); digitalWrite(2, HIGH); myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { if(digitalRead(2)==LOW){ myservo.write(0); // tell servo to go to position in variable 'pos' }else{ myservo.write(90); // tell servo to go to position in variable 'pos' } }
module FT5302 i took it from an old mother board tabled, it's only known by one datasheet, i use I2C connection with raspberry Pi Pico, i view many videos no one talk about it and i take the challenge, at first i need to understand I2C how it's work, than how to connect it and pull up resistor... all staff about hardware, but when i move on in software and call the library and initialize the I2C part i got a bunch of data which i did not understand which is relative with capacitive touch reading x or y and addressig,
can you help me please Build a temperature control system based on Lab VIEW and Arduino MCU, connect a temperature sensor to the Arduino unit, let the user define a three levels of control as following: - Level 1 if temperature is less than 22 °C, a green LED should be turned ON. - Level 2: if temperature is more than 22°C and less than 30°C, a fan should be turned on to 50% of its max speed. -Level 3: if temperature is more than 30°C and less than 38°C, the fan should work at 90% of its max speed. - Level 4: if the temperature exceeds 38°C then turn a Red LED ON and a 5V buzzer at a IkHz frequency. store the temperature values in a file with a rate of one reading each minute.
//code 1 #define trig 11 #define echo 12 int distance=0,t=0; void setup() { Serial.begin(9600); pinMode(trig,OUTPUT); pinMode(echo,INPUT); } void loop() { digitalWrite(trig,LOW); delayMicroseconds(5); digitalWrite(trig,HIGH); delayMicroseconds(10); digitalWrite(trig,LOW); t=pulseIn(echo,HIGH); distance=t/57;//Distance = (Speed of Sound * Time/2) = t/(1/((350*0.0001)/2)) Serial.println(distance); delay(50); } /////////////////////////////////////////////////// //code2 // --------------------------------------------------------------------------- // Example NewPing library sketch that does a ping about 20 times per second. // --------------------------------------------------------------------------- #include <NewPing.h> #define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic sensor. #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. void setup() { Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results. } void loop() { delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings. Serial.print("Ping: "); Serial.print(sonar.ping_cm()); // Send ping, get distance in cm and print result (0 = outside set distance range) Serial.println("cm"); }
كورس مجاني عبارة عن محاضرات بشرح فيها اذاي تصنع اجهزه طبيه بواسطه اي microcontroller وكمان بتسبولي في التعليقات مقترحات عن مشاريع في المجال الطبي وانا بعمل عليها فديو وبشرح الاكواد
hi .. ı have some problems about when using seri port communication and opencv robotic hand display .. display is freezing unfortunately . ı can not solve this problem .. you can do this as seen .. what can ı solve problem of freezing display ? .. thanx