├── 123.slx ├── MPU6050.slx ├── MPU6050002ml.slx ├── Motor.slx ├── Motor.slx.autosave.zip ├── Motor.slx.r2012b ├── README.md ├── boucleferm.slx ├── complementary filter ├── compl.slx └── try2 │ └── cxomlp.slx ├── configuration ├── Fritzing.fzz ├── configurations.txt ├── console_communication.ino ├── eeprom_store.ino ├── motors.ino ├── selfbalancingrobot.ino └── serial_communication.ino ├── encoders ├── 276-1321-Replacement-Wheel-20150518.pdf ├── Nouveau document texte.txt └── Screenshot_2.jpg ├── everything _about_SBRobots ├── .SimulinkProject │ ├── Project.xml │ ├── ProjectData.type.Info.xml │ ├── Root.type.Categories │ │ ├── FileClassCategory.type.Category.xml │ │ ├── FileClassCategory.type.Category │ │ │ ├── artifact.type.Label.xml │ │ │ ├── convenience.type.Label.xml │ │ │ ├── derived.type.Label.xml │ │ │ ├── design.type.Label.xml │ │ │ ├── none.type.Label.xml │ │ │ └── other.type.Label.xml │ │ ├── ReviewCategory.type.Category.xml │ │ ├── ReviewCategory.type.Category │ │ │ ├── approved.type.Label.xml │ │ │ ├── needMoreInfo.type.Label.xml │ │ │ ├── rejected.type.Label.xml │ │ │ └── toReview.type.Label.xml │ │ ├── slprj │ │ │ ├── realtime │ │ │ │ ├── _sharedutils │ │ │ │ │ ├── shared_file.sldd │ │ │ │ │ ├── shared_file.slddc │ │ │ │ │ └── tflSUInfo.mat │ │ │ │ └── untitled12 │ │ │ │ │ └── tmwinternal │ │ │ │ │ ├── binfo.mat │ │ │ │ │ └── minfo.mat │ │ │ └── sl_proj.tmw │ │ ├── untitled12.slx │ │ └── untitled12_rtt │ │ │ ├── HardwareSerial.cpp │ │ │ ├── HardwareSerial.o │ │ │ ├── MW │ │ │ └── untitled12.elf │ │ │ ├── Print.cpp │ │ │ ├── Print.o │ │ │ ├── Servo.cpp │ │ │ ├── Servo.o │ │ │ ├── WInterrupts.c │ │ │ ├── WInterrupts.o │ │ │ ├── WMath.cpp │ │ │ ├── WMath.o │ │ │ ├── WString.cpp │ │ │ ├── WString.o │ │ │ ├── buildInfo.mat │ │ │ ├── codeInfo.mat │ │ │ ├── defines.txt │ │ │ ├── ert_main.c │ │ │ ├── ert_main.o │ │ │ ├── io_wrappers.cpp │ │ │ ├── io_wrappers.o │ │ │ ├── modelsources.txt │ │ │ ├── new.cpp │ │ │ ├── new.o │ │ │ ├── rtw_proj.tmw │ │ │ ├── rtwtypes.h │ │ │ ├── rtwtypeschksum.mat │ │ │ ├── tmp.trash │ │ │ ├── untitled12.bin │ │ │ ├── untitled12.c │ │ │ ├── untitled12.h │ │ │ ├── untitled12.hex │ │ │ ├── untitled12.mk │ │ │ ├── untitled12.o │ │ │ ├── untitled12_data.c │ │ │ ├── untitled12_data.o │ │ │ ├── untitled12_private.h │ │ │ ├── untitled12_ref.rsp │ │ │ ├── untitled12_types.h │ │ │ ├── wiring.c │ │ │ ├── wiring.o │ │ │ ├── wiring_analog.c │ │ │ ├── wiring_analog.o │ │ │ ├── wiring_digital.c │ │ │ └── wiring_digital.o │ └── uuid-19a689ed-04d1-4dcd-8fab-a02b8a3d89fb.xml ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 5616-les-technologies-mems-ens.pdf ├── Kalman │ ├── Nouveau document texte.txt │ ├── filter.pdf │ ├── kalamn.docx │ ├── kalman.pdf │ ├── kalman_intro.pdf │ └── ~$kalamn.docx ├── Nouveau dossier │ ├── F34KFSLHV3QD55N.rar │ ├── FNJ66JVHV3QD55O.rar │ ├── FTTGGM6HV3QD55I.rar │ └── lkjhjk.txt ├── PID │ ├── Improving the Beginner │ │ ├── 2.docx │ │ ├── 3.docx │ │ ├── 4.docx │ │ ├── 5.docx │ │ ├── 6.docx │ │ ├── 7.docx │ │ ├── 8.docx │ │ └── Improving the Beginner1.docx │ ├── Nouveau Document Microsoft Office Word.docx │ ├── Nouveau document texte.txt │ ├── Proportional Integral Derivative.docx │ ├── astrom-ch6.pdf │ ├── correcteur_pid.pdf │ └── pid.jpg ├── Screenshot_00.jpg ├── Screenshot_1.jpg ├── arduino │ ├── 542 │ │ ├── .SimulinkProject │ │ │ ├── Project.xml │ │ │ ├── ProjectData.type.Info.xml │ │ │ ├── Root.type.Categories │ │ │ │ ├── FileClassCategory.type.Category.xml │ │ │ │ ├── FileClassCategory.type.Category │ │ │ │ │ ├── artifact.type.Label.xml │ │ │ │ │ ├── convenience.type.Label.xml │ │ │ │ │ ├── derived.type.Label.xml │ │ │ │ │ ├── design.type.Label.xml │ │ │ │ │ ├── none.type.Label.xml │ │ │ │ │ └── other.type.Label.xml │ │ │ │ ├── ReviewCategory.type.Category.xml │ │ │ │ └── ReviewCategory.type.Category │ │ │ │ │ ├── approved.type.Label.xml │ │ │ │ │ ├── needMoreInfo.type.Label.xml │ │ │ │ │ ├── rejected.type.Label.xml │ │ │ │ │ └── toReview.type.Label.xml │ │ │ └── uuid-eefbeea8-bb88-4c39-aaa4-58f1aa3c2f40.xml │ │ ├── untitled.slx │ │ └── untitled415.prj │ ├── .SimulinkProject │ │ ├── Extensions.type.Root │ │ │ └── Information.type.Extension.xml │ │ ├── Project.xml │ │ ├── ProjectData.type.Info.xml │ │ ├── Root.type.Categories │ │ │ ├── FileClassCategory.type.Category.xml │ │ │ ├── FileClassCategory.type.Category │ │ │ │ ├── artifact.type.Label.xml │ │ │ │ ├── convenience.type.Label.xml │ │ │ │ ├── derived.type.Label.xml │ │ │ │ ├── design.type.Label.xml │ │ │ │ ├── none.type.Label.xml │ │ │ │ └── other.type.Label.xml │ │ │ ├── ReviewCategory.type.Category.xml │ │ │ └── ReviewCategory.type.Category │ │ │ │ ├── approved.type.Label.xml │ │ │ │ ├── needMoreInfo.type.Label.xml │ │ │ │ ├── rejected.type.Label.xml │ │ │ │ └── toReview.type.Label.xml │ │ └── uuid-b5eb2254-f494-4767-8215-317f3f6771e2.xml │ ├── Nouveau document texte.txt │ ├── jiho.mat │ ├── matlab1.mat │ ├── slprj │ │ ├── grt │ │ │ ├── _sharedutils │ │ │ │ ├── shared_file.sldd │ │ │ │ ├── shared_file.slddc │ │ │ │ └── tflSUInfo.mat │ │ │ └── untitled │ │ │ │ └── tmwinternal │ │ │ │ └── minfo.mat │ │ └── sl_proj.tmw │ ├── untitled.slx │ ├── untitled458.prj │ ├── untitled755.slx │ ├── untitled7554.slx │ ├── untitled_grt_rtw │ │ ├── buildInfo.mat │ │ ├── build_exception.mat │ │ ├── codeInfo.mat │ │ ├── defines.txt │ │ ├── modelsources.txt │ │ ├── rtGetInf.c │ │ ├── rtGetInf.h │ │ ├── rtGetNaN.c │ │ ├── rtGetNaN.h │ │ ├── rt_nonfinite.c │ │ ├── rt_nonfinite.h │ │ ├── rtmodel.h │ │ ├── rtw_proj.tmw │ │ ├── rtwtypes.h │ │ ├── rtwtypeschksum.mat │ │ ├── untitled.bat │ │ ├── untitled.c │ │ ├── untitled.h │ │ ├── untitled.mk │ │ ├── untitled_data.c │ │ ├── untitled_private.h │ │ ├── untitled_ref.rsp │ │ └── untitled_types.h │ └── uyfi.slx ├── bleutooth │ ├── Nouveau document texte.txt │ └── Serial-Bluetooth-Arduino-Master-Slave.pdf ├── diff types de robot │ ├── 2-Wheel Self Balancing Robot by using Arduino and MPU6050 │ │ ├── FKNWUJTHVPWOS7C.zip │ │ └── Nouveau document texte.txt │ ├── ARDUINO MPU 6050 │ │ ├── ARDUINO MPU 6050.docx │ │ └── Nouveau document texte.txt │ ├── Arduino MPU6050 Balancing Bot │ │ └── Nouveau document texte.txt │ ├── B-robot │ │ ├── 3D parts │ │ │ └── EVO_version │ │ │ │ ├── Bumper.stl │ │ │ │ ├── Electronics SHELF.stl │ │ │ │ ├── Regular Wheel.stl │ │ │ │ ├── motor SHELF.stl │ │ │ │ ├── regular ARM.stl │ │ │ │ ├── servo holder.stl │ │ │ │ └── top SHELF.stl │ │ └── Nouveau document texte.txt │ ├── Balancing robot for dummies │ │ ├── Caster_Bot.zip │ │ └── Nouveau document texte.txt │ ├── Balanduino (the best ) │ │ ├── Nouveau document texte.txt │ │ └── Screenshot_2.jpg │ ├── Barrett_s Projects │ │ ├── Balancing Robot.docx │ │ ├── BalancingBot.zip │ │ ├── Nouveau document texte.txt │ │ └── Screenshot_1.jpg │ ├── RemoteController │ │ ├── Components.docx │ │ ├── Nouveau document texte.txt │ │ └── astrom-ch6.pdf │ ├── balancing I and II and III │ │ ├── 1.docx │ │ ├── 2.docx │ │ └── 3.docx │ ├── balanxed │ │ ├── BalanXedBot.rar │ │ └── Nouveau document texte.txt │ ├── making a Balancing Robot (part 1) │ │ └── Nouveau document texte.txt │ ├── objectif based on the balanduino │ │ ├── BalancingRobotArduino-master.zip │ │ ├── Nouveau document texte.txt │ │ ├── Screenshot_10.jpg │ │ ├── Screenshot_11.jpg │ │ ├── Screenshot_3.jpg │ │ ├── Screenshot_4.jpg │ │ ├── Screenshot_5.jpg │ │ ├── Screenshot_6.jpg │ │ ├── Screenshot_8.jpg │ │ └── Screenshot_9.jpg │ ├── openCV │ │ ├── Nouveau document texte.txt │ │ └── Screenshot_3.jpg │ ├── python robot │ │ └── Nouveau document texte.txt │ ├── self balancing bot │ │ ├── A balancing robot kit is now avaliable via Kickstarter.docx │ │ ├── KalmanFilter-master.zip │ │ ├── Nouveau document texte.txt │ │ └── Screenshot_1.jpg │ └── x-firm │ │ ├── EncoderTestGUI_v_1.rar │ │ ├── K_Bot_Encoder_Test_V_1.rar │ │ ├── Motor_PID_Enc_v2_Bot.rar │ │ ├── Motor_PID_Enc_v2_GUI.rar │ │ └── Nouveau document texte.txt ├── i2c protocole │ ├── Nouveau document texte.txt │ └── i2c_bus_specification_1995.pdf ├── matériels │ ├── MPU 6050 │ │ ├── 1.jpg │ │ ├── IMU_10DOF_Kalman_Filter.pdf │ │ ├── Nouveau document texte.txt │ │ ├── Screenshot_1.jpg │ │ ├── Screenshot_4.jpg │ │ ├── accelerometre │ │ │ ├── MPU6050.zip │ │ │ ├── Nouveau document texte.txt │ │ │ └── Screenshot_2.jpg │ │ ├── gyroscope │ │ │ └── Nouveau document texte.txt │ │ ├── instead of the imu.jpg │ │ └── kgiul.jpg │ ├── Nouveau document texte.txt │ ├── matériel.docx │ ├── motor driver │ │ └── Nouveau document texte.txt │ ├── motors │ │ ├── Nouveau document texte.txt │ │ ├── Screenshot_1.jpg │ │ ├── Screenshot_2.jpg │ │ └── sf.jpg │ ├── servomoteur │ │ └── Introduction to Servo Motors _ Arduino.pdf │ └── xbee │ │ ├── Nouveau document texte.txt │ │ ├── Nouveau dossier │ │ ├── CoordinatorAPIOnRobotCh0.xml │ │ ├── FullController2015RouterAKAControllerCh0.xml │ │ ├── FullControllerWorking │ │ │ └── FullControllerWorking.ino │ │ └── Schematic Design of Robots.pdf │ │ └── Remote_Control_with_Xbee_and_Arduino.zip ├── must.txt ├── open cv │ ├── 0v7670 │ │ ├── Nouveau document texte.txt │ │ ├── OV7670 SCH.pdf │ │ ├── OV7670 software application note.pdf │ │ ├── OV7670.pdf │ │ ├── OV7670_DS_(1_4).pdf │ │ └── oc_sccb.pdf │ ├── Nouveau document texte.txt │ ├── Screenshot_3.jpg │ └── Serial Camera Module Programming Instructions and Tutorial.pdf ├── pendule.txt ├── rapport │ ├── Nouveau dossier │ │ ├── 452.jpg │ │ ├── 4755.jpg │ │ ├── 545.jpg │ │ ├── 785.jpg │ │ ├── 7852.jpg │ │ ├── 785210.jpg │ │ ├── Cascade PID implementation theory.jpg │ │ ├── Information flow.jpg │ │ ├── Nouveau document texte.txt │ │ ├── Nouveau dossier (3) │ │ │ ├── 1.jpg │ │ │ ├── Screenshot_1.jpg │ │ │ ├── ab1.jpg │ │ │ ├── abstra3.jpg │ │ │ ├── analyse fig1.jpg │ │ │ ├── analyse1.jpg │ │ │ ├── in g1.jpg │ │ │ ├── in1.jpg │ │ │ ├── in2.jpg │ │ │ ├── intro2.1.jpg │ │ │ ├── intro2.2.jpg │ │ │ └── purpuse and goal.jpg │ │ ├── Screensho.jpg │ │ ├── Screenshot_1.jpg │ │ ├── Screenshot_2.jpg │ │ ├── Screenshot_3.jpg │ │ ├── Screenshot_5.jpg │ │ ├── controle.jpg │ │ ├── diagramme.jpg │ │ ├── gragcet du programme.jpg │ │ ├── introduction 1.jpg │ │ ├── introduction 2.jpg │ │ ├── inverted pendulum process.jpg │ │ ├── job of the PID.jpg │ │ ├── kalman process.jpg │ │ ├── l289N.docx │ │ ├── lullom.jpg │ │ ├── modéle dynamique.jpg │ │ ├── phrases.docx │ │ ├── phy.jpg │ │ ├── servomoteur.docx │ │ ├── upright mass.jpg │ │ ├── why kalman 2.jpg │ │ └── why kalman.jpg │ ├── rapport pdf │ │ ├── 02-eSTA-V21.pdf │ │ ├── ICA20110200012_71434152.pdf │ │ └── most best reports │ │ │ └── Final Report PDF.pdf │ └── rapport11 │ │ ├── Le robot pendulaire a deux roues est un système dynamique instable.docx │ │ ├── eig a.jpg │ │ ├── généralité sur les robots.docx │ │ ├── psi.jpg │ │ ├── psidot.jpg │ │ ├── représentation d_état en boucle ouvert.jpg │ │ ├── sensors │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ └── 6.jpg │ │ ├── sortie de la sys en boucle ouvert.jpg │ │ ├── tf.jpg │ │ ├── theta.jpg │ │ └── thetadot.jpg ├── remote controle │ └── Nouveau document texte.txt └── the end │ ├── 7.jpg │ ├── Nouveau document texte.txt │ ├── Screenshot_6.jpg │ ├── Screenshot_7.jpg │ └── bbrobot.jpg ├── my_work ├── 99385 │ ├── Untitled.m │ └── try1.slx ├── Nouveau dossier (2) │ ├── at.m │ └── pidmodel12.slx ├── Nouveau dossier │ ├── .SimulinkProject │ │ ├── Project.xml │ │ ├── ProjectData.type.Info.xml │ │ ├── Root.type.Categories │ │ │ ├── FileClassCategory.type.Category.xml │ │ │ ├── FileClassCategory.type.Category │ │ │ │ ├── artifact.type.Label.xml │ │ │ │ ├── convenience.type.Label.xml │ │ │ │ ├── derived.type.Label.xml │ │ │ │ ├── design.type.Label.xml │ │ │ │ ├── none.type.Label.xml │ │ │ │ └── other.type.Label.xml │ │ │ ├── ReviewCategory.type.Category.xml │ │ │ └── ReviewCategory.type.Category │ │ │ │ ├── approved.type.Label.xml │ │ │ │ ├── needMoreInfo.type.Label.xml │ │ │ │ ├── rejected.type.Label.xml │ │ │ │ └── toReview.type.Label.xml │ │ └── uuid-12ed38d8-8de1-40ff-830e-6a965df71cf5.xml │ ├── at.m │ ├── pidmodel.prj │ └── pidmodel1.slx ├── Untitled.m ├── Untitled102.m ├── lqr.m ├── lqr1.slx ├── pid1.slx └── untitled1.slx ├── sortie moteur.jpg └── useful links ├── README.md ├── Untitled10.m ├── i can try.txt ├── important.txt ├── other.txt ├── untitled100.slx └── valeur (1).txt /123.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/123.slx -------------------------------------------------------------------------------- /MPU6050.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/MPU6050.slx -------------------------------------------------------------------------------- /MPU6050002ml.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/MPU6050002ml.slx -------------------------------------------------------------------------------- /Motor.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/Motor.slx -------------------------------------------------------------------------------- /Motor.slx.autosave.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/Motor.slx.autosave.zip -------------------------------------------------------------------------------- /Motor.slx.r2012b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/Motor.slx.r2012b -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Self-balancing-robot-with-matlab 2 | 3 | This project aims to build a two-wheeled robot that works as a small, autonomous, segway. It was designed to be small to fit on a table so that people can see it more easily. 4 | 5 | 6 | Control systems were developed using mathematical model-based design and simulating the system using Matlab and Simulink prior to its implementation on the robot. The design of the robot was done by first analyzing the dynamics of the inverted pendulum so that it had a good design to make it easier to control from the beginning. The mechanical design was done using the solidworks software. 7 | 8 | ![screenshot_14](https://user-images.githubusercontent.com/31218608/35348560-4c5d2142-0130-11e8-90cc-62a84735d001.png) 9 | 10 | final review of the Self balancing robot : 11 | 12 | ![20160602_162228](https://user-images.githubusercontent.com/31218608/35348654-90da7090-0130-11e8-9c2e-7d304f613af1.jpg) 13 | 14 | 15 | 16 | for more details you can find the final report of my project here : https://drive.google.com/file/d/0B6mYnb1g2UTDSEh2NkRWSUpfeEE/view 17 | -------------------------------------------------------------------------------- /boucleferm.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/boucleferm.slx -------------------------------------------------------------------------------- /complementary filter/compl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/complementary filter/compl.slx -------------------------------------------------------------------------------- /complementary filter/try2/cxomlp.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/complementary filter/try2/cxomlp.slx -------------------------------------------------------------------------------- /configuration/Fritzing.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/configuration/Fritzing.fzz -------------------------------------------------------------------------------- /configuration/configurations.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/configuration/configurations.txt -------------------------------------------------------------------------------- /configuration/console_communication.ino: -------------------------------------------------------------------------------- 1 | #define CONSOLE_I2C_ADDRESS 0x20 2 | #define CONSOLE_I2C_MSG_SIZE 32 3 | char consoleMsg[CONSOLE_I2C_MSG_SIZE]; 4 | 5 | void get_msg_from_console() { 6 | Wire.beginTransmission(CONSOLE_I2C_ADDRESS); 7 | Wire.requestFrom(CONSOLE_I2C_ADDRESS,CONSOLE_I2C_MSG_SIZE); 8 | Wire.endTransmission(); 9 | 10 | //Serial.println("get_msg_from_console"); 11 | 12 | union uu { 13 | Configure configuration; 14 | unsigned char bytes[CONSOLE_I2C_MSG_SIZE]; 15 | } 16 | configurationUnion; 17 | 18 | for (int i=0; i maxSpeed) 51 | speed = maxSpeed; 52 | else if (speed < -maxSpeed) 53 | speed = -maxSpeed; 54 | 55 | int pwmToMotor = 0; 56 | if (motor == 1) 57 | pwmToMotor = (abs(speed)*255/100)*motor1Calibration; 58 | else 59 | pwmToMotor = (abs(speed)*255/100)*motor2Calibration; 60 | if (pwmToMotor > 255) 61 | pwmToMotor = 255; 62 | 63 | if (motor == 1) { 64 | if (speed == 0) { 65 | digitalWrite(dir_a, motor1ForwardDir); 66 | analogWrite(pwm_a, 0); 67 | } 68 | else if (speed < 0) { 69 | digitalWrite(dir_a, motor1ForwardDir); 70 | analogWrite(pwm_a, pwmToMotor); 71 | } 72 | else { 73 | digitalWrite(dir_a, motor1BackwardDir); 74 | analogWrite(pwm_a, pwmToMotor); 75 | } 76 | } 77 | else { 78 | if (speed == 0) { 79 | digitalWrite(dir_b, motor2ForwardDir); 80 | analogWrite(pwm_b, 0); 81 | } 82 | else if (speed < 0) { 83 | digitalWrite(dir_b, motor2ForwardDir); 84 | analogWrite(pwm_b, pwmToMotor); 85 | } 86 | else { 87 | digitalWrite(dir_b, motor2BackwardDir); 88 | analogWrite(pwm_b, pwmToMotor); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /configuration/serial_communication.ino: -------------------------------------------------------------------------------- 1 | #define SERIALCOMMAND_BUFFER 32 2 | char buffer[SERIALCOMMAND_BUFFER + 1]; 3 | byte bufPos; 4 | char *last; 5 | 6 | void readSerialCommand() { 7 | while (Serial1.available() > 0) { 8 | char inChar = Serial1.read(); // Read single available character, there may be more waiting 9 | if (inChar == '\r' || inChar == '\n' || inChar == '\0') { // Check for the terminator (default '\r') meaning end of command 10 | /* 11 | Serial1.print("Received: "); 12 | Serial1.println(buffer); 13 | */ 14 | 15 | char *command = strtok_r(buffer, " ", &last); 16 | switch (command[0]) { 17 | case 'r': 18 | remoteControl(); 19 | break; 20 | } 21 | /*char *param1 = strtok_r(NULL, " ", &last); 22 | char *param2 = strtok_r(NULL, " ", &last); 23 | 24 | Serial1.print("command: "); 25 | Serial1.print(command); 26 | Serial1.print("param1: "); 27 | Serial1.println(param1);*/ 28 | 29 | buffer[0] = '\0'; 30 | bufPos = 0; 31 | } 32 | else if (isprint(inChar)) { // Only printable characters into the buffer 33 | if (bufPos < SERIALCOMMAND_BUFFER) { 34 | buffer[bufPos++] = inChar; // Put character into buffer 35 | buffer[bufPos] = '\0'; // Null terminate 36 | } 37 | else { 38 | Serial1.println("Buffer full"); 39 | } 40 | } 41 | } 42 | } 43 | char* next() { 44 | return strtok_r(NULL, " ", &last); 45 | } 46 | 47 | void remoteControl() { 48 | char *steeringTmp = strtok_r(NULL, " ", &last); 49 | char *throttleAndBreakTmp = strtok_r(NULL, " ", &last); 50 | 51 | steering = atoi(steeringTmp); 52 | speedPIDSetpoint = (float)(atoi(throttleAndBreakTmp)/100); 53 | 54 | /*Serial1.print("steeringTmp: "); 55 | Serial1.print(steeringTmp); 56 | Serial1.print(" throttleAndBreakTmp: "); 57 | Serial1.println(throttleAndBreakTmp); 58 | Serial1.print("steering: "); 59 | Serial1.print(steering); 60 | Serial1.print(" speedPIDSetpoint: "); 61 | Serial1.println(speedPIDSetpoint);*/ 62 | 63 | // since we got a valid command from remote control, reset the watchdog 64 | remoteControlWatchdogTimedAction.reset(); 65 | } 66 | 67 | 68 | /*void initSerialCommand() { 69 | sCmd.addCommand("P", processCommand); // Converts two arguments to integers and echos them back 70 | sCmd.setDefaultHandler(unrecognized); // Handler for command that isn't matched (says "What?") 71 | Serial1.println("Ready"); 72 | } 73 | 74 | void processCommand() { 75 | int aNumber; 76 | char *arg; 77 | 78 | Serial1.println("We're in processCommand"); 79 | arg = sCmd.next(); 80 | if (arg != NULL) { 81 | aNumber = atoi(arg); // Converts a char string to an integer 82 | Serial1.print("First argument was: "); 83 | Serial1.println(aNumber); 84 | } 85 | else { 86 | Serial1.println("No arguments"); 87 | } 88 | 89 | arg = sCmd.next(); 90 | if (arg != NULL) { 91 | aNumber = atol(arg); 92 | Serial1.print("Second argument was: "); 93 | Serial1.println(aNumber); 94 | } 95 | else { 96 | Serial1.println("No second argument"); 97 | } 98 | } 99 | 100 | // This gets set as the default handler, and gets called when no other command matches. 101 | void unrecognized(const char *command) { 102 | Serial1.println("What?"); 103 | }*/ 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /encoders/276-1321-Replacement-Wheel-20150518.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/encoders/276-1321-Replacement-Wheel-20150518.pdf -------------------------------------------------------------------------------- /encoders/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://thedenneys.org/pub/robot/encoders/ 2 | http://johntrimble.com/blog/2013/07/11/building-an-incremental-rotary-encoder/ 3 | https://amtek.wordpress.com/2011/01/18/encoder-tut/ 4 | https://botscene.net/2012/10/18/make-a-low-cost-absolute-encoder/ 5 | http://www.societyofrobots.com/sensors_encoder.shtml 6 | http://letsmakerobots.com/node/12293 7 | http://seattlerobotics.org/encoder/200001/simplemotor.htm 8 | http://www.seattlerobotics.org/encoder/200112/srs.htm 9 | 10 | 11 | http://letsmakerobots.com/node/42160 important -------------------------------------------------------------------------------- /encoders/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/encoders/Screenshot_2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/ProjectData.type.Info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/shared_file.sldd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/shared_file.sldd -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/shared_file.slddc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/shared_file.slddc -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/tflSUInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/_sharedutils/tflSUInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/untitled12/tmwinternal/binfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/untitled12/tmwinternal/binfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/untitled12/tmwinternal/minfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/realtime/untitled12/tmwinternal/minfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/slprj/sl_proj.tmw: -------------------------------------------------------------------------------- 1 | Simulink Coder project marker file. Please don't change it. 2 | slprjVersion: 8.1_44_002 -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/HardwareSerial.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/HardwareSerial.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/MW/untitled12.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/MW/untitled12.elf -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/Print.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Print.cpp - Base class that provides print() and println() 3 | Copyright (c) 2008 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Modified 23 November 2006 by David A. Mellis 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include "Arduino.h" 27 | 28 | #include "Print.h" 29 | 30 | // Public Methods ////////////////////////////////////////////////////////////// 31 | 32 | /* default implementation: may be overridden */ 33 | size_t Print::write(const uint8_t *buffer, size_t size) 34 | { 35 | size_t n = 0; 36 | while (size--) { 37 | n += write(*buffer++); 38 | } 39 | return n; 40 | } 41 | 42 | size_t Print::print(const __FlashStringHelper *ifsh) 43 | { 44 | const prog_char *p = (const prog_char *)ifsh; 45 | size_t n = 0; 46 | while (1) { 47 | unsigned char c = pgm_read_byte(p++); 48 | if (c == 0) break; 49 | n += write(c); 50 | } 51 | return n; 52 | } 53 | 54 | size_t Print::print(const String &s) 55 | { 56 | size_t n = 0; 57 | for (uint16_t i = 0; i < s.length(); i++) { 58 | n += write(s[i]); 59 | } 60 | return n; 61 | } 62 | 63 | size_t Print::print(const char str[]) 64 | { 65 | return write(str); 66 | } 67 | 68 | size_t Print::print(char c) 69 | { 70 | return write(c); 71 | } 72 | 73 | size_t Print::print(unsigned char b, int base) 74 | { 75 | return print((unsigned long) b, base); 76 | } 77 | 78 | size_t Print::print(int n, int base) 79 | { 80 | return print((long) n, base); 81 | } 82 | 83 | size_t Print::print(unsigned int n, int base) 84 | { 85 | return print((unsigned long) n, base); 86 | } 87 | 88 | size_t Print::print(long n, int base) 89 | { 90 | if (base == 0) { 91 | return write(n); 92 | } else if (base == 10) { 93 | if (n < 0) { 94 | int t = print('-'); 95 | n = -n; 96 | return printNumber(n, 10) + t; 97 | } 98 | return printNumber(n, 10); 99 | } else { 100 | return printNumber(n, base); 101 | } 102 | } 103 | 104 | size_t Print::print(unsigned long n, int base) 105 | { 106 | if (base == 0) return write(n); 107 | else return printNumber(n, base); 108 | } 109 | 110 | size_t Print::print(double n, int digits) 111 | { 112 | return printFloat(n, digits); 113 | } 114 | 115 | size_t Print::println(const __FlashStringHelper *ifsh) 116 | { 117 | size_t n = print(ifsh); 118 | n += println(); 119 | return n; 120 | } 121 | 122 | size_t Print::print(const Printable& x) 123 | { 124 | return x.printTo(*this); 125 | } 126 | 127 | size_t Print::println(void) 128 | { 129 | size_t n = print('\r'); 130 | n += print('\n'); 131 | return n; 132 | } 133 | 134 | size_t Print::println(const String &s) 135 | { 136 | size_t n = print(s); 137 | n += println(); 138 | return n; 139 | } 140 | 141 | size_t Print::println(const char c[]) 142 | { 143 | size_t n = print(c); 144 | n += println(); 145 | return n; 146 | } 147 | 148 | size_t Print::println(char c) 149 | { 150 | size_t n = print(c); 151 | n += println(); 152 | return n; 153 | } 154 | 155 | size_t Print::println(unsigned char b, int base) 156 | { 157 | size_t n = print(b, base); 158 | n += println(); 159 | return n; 160 | } 161 | 162 | size_t Print::println(int num, int base) 163 | { 164 | size_t n = print(num, base); 165 | n += println(); 166 | return n; 167 | } 168 | 169 | size_t Print::println(unsigned int num, int base) 170 | { 171 | size_t n = print(num, base); 172 | n += println(); 173 | return n; 174 | } 175 | 176 | size_t Print::println(long num, int base) 177 | { 178 | size_t n = print(num, base); 179 | n += println(); 180 | return n; 181 | } 182 | 183 | size_t Print::println(unsigned long num, int base) 184 | { 185 | size_t n = print(num, base); 186 | n += println(); 187 | return n; 188 | } 189 | 190 | size_t Print::println(double num, int digits) 191 | { 192 | size_t n = print(num, digits); 193 | n += println(); 194 | return n; 195 | } 196 | 197 | size_t Print::println(const Printable& x) 198 | { 199 | size_t n = print(x); 200 | n += println(); 201 | return n; 202 | } 203 | 204 | // Private Methods ///////////////////////////////////////////////////////////// 205 | 206 | size_t Print::printNumber(unsigned long n, uint8_t base) { 207 | char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. 208 | char *str = &buf[sizeof(buf) - 1]; 209 | 210 | *str = '\0'; 211 | 212 | // prevent crash if called with base == 1 213 | if (base < 2) base = 10; 214 | 215 | do { 216 | unsigned long m = n; 217 | n /= base; 218 | char c = m - base * n; 219 | *--str = c < 10 ? c + '0' : c + 'A' - 10; 220 | } while(n); 221 | 222 | return write(str); 223 | } 224 | 225 | size_t Print::printFloat(double number, uint8_t digits) 226 | { 227 | size_t n = 0; 228 | 229 | // Handle negative numbers 230 | if (number < 0.0) 231 | { 232 | n += print('-'); 233 | number = -number; 234 | } 235 | 236 | // Round correctly so that print(1.999, 2) prints as "2.00" 237 | double rounding = 0.5; 238 | for (uint8_t i=0; i 0) { 250 | n += print("."); 251 | } 252 | 253 | // Extract digits from the remainder one at a time 254 | while (digits-- > 0) 255 | { 256 | remainder *= 10.0; 257 | int toPrint = int(remainder); 258 | n += print(toPrint); 259 | remainder -= toPrint; 260 | } 261 | 262 | return n; 263 | } 264 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/Print.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/Print.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/Servo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/Servo.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WInterrupts.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WInterrupts.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WMath.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WMath.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WString.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/WString.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/buildInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/buildInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/codeInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/codeInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/defines.txt: -------------------------------------------------------------------------------- 1 | MODEL=untitled12 2 | NUMST=1 3 | NCSTATES=0 4 | HAVESTDIO 5 | ONESTEPFCN=0 6 | TERMFCN=1 7 | MAT_FILE=0 8 | MULTI_INSTANCE_CODE=0 9 | INTEGER_CODE=0 10 | MT=0 11 | CLASSIC_INTERFACE=0 12 | TID01EQ=0 13 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/ert_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: ert_main.c 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #include "untitled12.h" 18 | #include "Arduino.h" 19 | #define STEP_SIZE (unsigned long) (10000) 20 | 21 | int_T main(void) 22 | { 23 | unsigned long oldtime = 0L; 24 | unsigned long actualtime; 25 | init(); 26 | untitled12_initialize(); 27 | 28 | #ifdef _RTT_USE_SERIAL0_ 29 | 30 | Serial_begin(0, 9600); 31 | 32 | #endif 33 | 34 | /* The main step loop */ 35 | while (rtmGetErrorStatus(untitled12_M) == (NULL)) { 36 | actualtime = micros(); 37 | if ((unsigned long) (actualtime - oldtime) >= STEP_SIZE) { 38 | oldtime = actualtime; 39 | untitled12_output(); 40 | 41 | /* Get model outputs here */ 42 | untitled12_update(); 43 | } 44 | } 45 | 46 | untitled12_terminate(); 47 | return 0; 48 | } 49 | 50 | /* 51 | * File trailer for generated code. 52 | * 53 | * [EOF] 54 | */ 55 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/ert_main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/ert_main.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/io_wrappers.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Wrappers to make I/O functions available with C linkage. This allows C++ 3 | * methods to be called from C code. 4 | * 5 | * Copyright 2012 The MathWorks, Inc. */ 6 | 7 | 8 | #include 9 | #include "Arduino.h" 10 | #include "Servo.h" 11 | 12 | extern "C" { 13 | void __cxa_pure_virtual(void); 14 | } 15 | 16 | extern "C" void Serial_begin(int port, long r) 17 | { 18 | #ifdef _ROTH_MEGA2560_ 19 | switch(port) { 20 | case 0: 21 | Serial.begin(r); 22 | break; 23 | case 1: 24 | Serial1.begin(r); 25 | break; 26 | case 2: 27 | Serial2.begin(r); 28 | break; 29 | case 3: 30 | Serial3.begin(r); 31 | break; 32 | } 33 | #else 34 | Serial.begin(r); 35 | #endif 36 | } 37 | 38 | extern "C" void Serial_read(int port, int showOutStatus, uint8_t *outData, int *outStatus) 39 | { 40 | int libFcnOutput; 41 | #ifdef _ROTH_MEGA2560_ /* Could do without this conditional */ 42 | switch(port) { 43 | case 0: 44 | libFcnOutput = Serial.read(); 45 | break; 46 | case 1: 47 | libFcnOutput = Serial1.read(); 48 | break; 49 | case 2: 50 | libFcnOutput = Serial2.read(); 51 | break; 52 | case 3: 53 | libFcnOutput = Serial3.read(); 54 | break; 55 | } 56 | #else 57 | libFcnOutput = Serial.read(); 58 | #endif 59 | *outData = (uint8_t) libFcnOutput; 60 | *outStatus = (libFcnOutput != -1); 61 | } 62 | 63 | extern "C" void Serial_write(int port, uint8_t * c, size_t s) 64 | { 65 | #ifdef _ROTH_MEGA2560_ 66 | switch(port) { 67 | case 0: 68 | Serial.write(c, s); 69 | break; 70 | case 1: 71 | Serial1.write(c, s); 72 | break; 73 | case 2: 74 | Serial2.write(c, s); 75 | break; 76 | case 3: 77 | Serial3.write(c, s); 78 | break; 79 | } 80 | #else 81 | Serial.write(c, s); 82 | #endif 83 | } 84 | 85 | #if _RTT_NUMSERVOS_ != 0 86 | Servo myservos[_RTT_NUMSERVOS_]; 87 | 88 | extern "C" void MW_servoAttach(uint8_t nServo, uint8_t pinNumber) 89 | { 90 | myservos[nServo].attach(pinNumber); 91 | } 92 | 93 | extern "C" void MW_servoWrite(uint8_t nServo, uint8_t inValue) 94 | { 95 | myservos[nServo].write(inValue); 96 | } 97 | 98 | extern "C" int MW_servoRead(uint8_t nServo) 99 | { 100 | return myservos[nServo].read(); 101 | } 102 | #endif -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/io_wrappers.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/io_wrappers.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/modelsources.txt: -------------------------------------------------------------------------------- 1 | untitled12.c 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/new.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * operator new(size_t size) 4 | { 5 | return malloc(size); 6 | } 7 | 8 | void operator delete(void * ptr) 9 | { 10 | free(ptr); 11 | } 12 | 13 | int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; 14 | void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; 15 | void __cxa_guard_abort (__guard *) {}; 16 | 17 | void __cxa_pure_virtual(void) {}; 18 | 19 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/new.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/new.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/rtw_proj.tmw: -------------------------------------------------------------------------------- 1 | Simulink Coder project for untitled12 using . MATLAB root = C:\Program Files\MATLAB\R2013a. SimStruct date: 09-nov.-2012 01:00:10 2 | This file is generated by Simulink Coder for use by the make utility 3 | to determine when to rebuild objects when the name of the current Simulink Coder project changes. 4 | The rtwinfomat located at: ..\slprj\realtime\untitled12\tmwinternal\binfo.mat 5 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/rtwtypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: rtwtypes.h 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef __RTWTYPES_H__ 18 | #define __RTWTYPES_H__ 19 | #ifndef TRUE 20 | # define TRUE (1U) 21 | #endif 22 | 23 | #ifndef FALSE 24 | # define FALSE (0U) 25 | #endif 26 | 27 | #ifndef __TMWTYPES__ 28 | #define __TMWTYPES__ 29 | #include 30 | 31 | /*=======================================================================* 32 | * Target hardware information 33 | * Device type: Atmel->AVR 34 | * Number of bits: char: 8 short: 16 int: 16 35 | * long: 32 36 | * native word size: 8 37 | * Byte ordering: LittleEndian 38 | * Signed integer division rounds to: Zero 39 | * Shift right on a signed integer as arithmetic shift: on 40 | *=======================================================================*/ 41 | 42 | /*=======================================================================* 43 | * Fixed width word size data types: * 44 | * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * 45 | * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * 46 | * real32_T, real64_T - 32 and 64 bit floating point numbers * 47 | *=======================================================================*/ 48 | typedef signed char int8_T; 49 | typedef unsigned char uint8_T; 50 | typedef int int16_T; 51 | typedef unsigned int uint16_T; 52 | typedef long int32_T; 53 | typedef unsigned long uint32_T; 54 | typedef float real32_T; 55 | typedef double real64_T; 56 | 57 | /*===========================================================================* 58 | * Generic type definitions: real_T, time_T, boolean_T, int_T, uint_T, * 59 | * ulong_T, char_T and byte_T. * 60 | *===========================================================================*/ 61 | typedef double real_T; 62 | typedef double time_T; 63 | typedef unsigned char boolean_T; 64 | typedef int int_T; 65 | typedef unsigned int uint_T; 66 | typedef unsigned long ulong_T; 67 | typedef char char_T; 68 | typedef unsigned char uchar_T; 69 | typedef char_T byte_T; 70 | 71 | /*===========================================================================* 72 | * Complex number type definitions * 73 | *===========================================================================*/ 74 | #define CREAL_T 75 | 76 | typedef struct { 77 | real32_T re; 78 | real32_T im; 79 | } creal32_T; 80 | 81 | typedef struct { 82 | real64_T re; 83 | real64_T im; 84 | } creal64_T; 85 | 86 | typedef struct { 87 | real_T re; 88 | real_T im; 89 | } creal_T; 90 | 91 | #define _CINT8_T 92 | 93 | typedef struct { 94 | int8_T re; 95 | int8_T im; 96 | } cint8_T; 97 | 98 | #define _CUINT8_T 99 | 100 | typedef struct { 101 | uint8_T re; 102 | uint8_T im; 103 | } cuint8_T; 104 | 105 | #define _CINT16_T 106 | 107 | typedef struct { 108 | int16_T re; 109 | int16_T im; 110 | } cint16_T; 111 | 112 | #define _CUINT16_T 113 | 114 | typedef struct { 115 | uint16_T re; 116 | uint16_T im; 117 | } cuint16_T; 118 | 119 | #define _CINT32_T 120 | 121 | typedef struct { 122 | int32_T re; 123 | int32_T im; 124 | } cint32_T; 125 | 126 | #define _CUINT32_T 127 | 128 | typedef struct { 129 | uint32_T re; 130 | uint32_T im; 131 | } cuint32_T; 132 | 133 | /*=======================================================================* 134 | * Min and Max: * 135 | * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * 136 | * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * 137 | *=======================================================================*/ 138 | #define MAX_int8_T ((int8_T)(127)) 139 | #define MIN_int8_T ((int8_T)(-128)) 140 | #define MAX_uint8_T ((uint8_T)(255U)) 141 | #define MIN_uint8_T ((uint8_T)(0U)) 142 | #define MAX_int16_T ((int16_T)(32767)) 143 | #define MIN_int16_T ((int16_T)(-32768)) 144 | #define MAX_uint16_T ((uint16_T)(65535U)) 145 | #define MIN_uint16_T ((uint16_T)(0U)) 146 | #define MAX_int32_T ((int32_T)(2147483647)) 147 | #define MIN_int32_T ((int32_T)(-2147483647-1)) 148 | #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU)) 149 | #define MIN_uint32_T ((uint32_T)(0U)) 150 | 151 | /* Logical type definitions */ 152 | #if (!defined(__cplusplus)) && (!defined(__true_false_are_keywords)) 153 | # ifndef false 154 | # define false (0U) 155 | # endif 156 | 157 | # ifndef true 158 | # define true (1U) 159 | # endif 160 | #endif 161 | 162 | /* 163 | * Simulink Coder assumes the code is compiled on a target using a 2's complement representation 164 | * for signed integer values. 165 | */ 166 | #if ((SCHAR_MIN + 1) != -SCHAR_MAX) 167 | #error "This code must be compiled using a 2's complement representation for signed integer values" 168 | #endif 169 | 170 | /* This ID is used to detect inclusion of an incompatible rtwtypes.h */ 171 | #define RTWTYPES_ID_C08S16I16L32N08F1 172 | #else /* __TMWTYPES__ */ 173 | #define TMWTYPES_PREVIOUSLY_INCLUDED 174 | #endif /* __TMWTYPES__ */ 175 | 176 | /* Block D-Work pointer type */ 177 | typedef void * pointer_T; 178 | 179 | /* Simulink specific types */ 180 | #ifndef __SIMSTRUC_TYPES_H__ 181 | #define __SIMSTRUC_TYPES_H__ 182 | 183 | /* Trigger directions: falling, either, and rising */ 184 | typedef enum { 185 | FALLING_ZERO_CROSSING = -1, 186 | ANY_ZERO_CROSSING = 0, 187 | RISING_ZERO_CROSSING = 1 188 | } ZCDirection; 189 | 190 | /* Previous state of a trigger signal */ 191 | typedef uint8_T ZCSigState; 192 | 193 | /* Initial value of a trigger zero crossing signal */ 194 | #define UNINITIALIZED_ZCSIG 0x03U 195 | #define NEG_ZCSIG 0x02U 196 | #define POS_ZCSIG 0x01U 197 | #define ZERO_ZCSIG 0x00U 198 | 199 | /* Current state of a trigger signal */ 200 | typedef enum { 201 | FALLING_ZCEVENT = -1, 202 | NO_ZCEVENT = 0, 203 | RISING_ZCEVENT = 1 204 | } ZCEventType; 205 | 206 | #endif /* __SIMSTRUC_TYPES_H__ */ 207 | #endif /* __RTWTYPES_H__ */ 208 | 209 | /* 210 | * File trailer for generated code. 211 | * 212 | * [EOF] 213 | */ 214 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/rtwtypeschksum.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/rtwtypeschksum.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/tmp.trash: -------------------------------------------------------------------------------- 1 | 2 | avrdude: AVR device initialized and ready to accept instructions 3 | avrdude: Device signature = 0x1e950f 4 | avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed 5 | To disable this feature, specify the -D option. 6 | avrdude: erasing chip 7 | avrdude: reading input file "untitled12.hex" 8 | avrdude: input file untitled12.hex auto detected as Intel Hex 9 | avrdude: writing flash (16990 bytes): 10 | avrdude: 16990 bytes of flash written 11 | 12 | avrdude done. Thank you. 13 | 14 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: untitled12.c 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #include "untitled12.h" 18 | #include "untitled12_private.h" 19 | 20 | /* Block signals (auto storage) */ 21 | B_untitled12_T untitled12_B; 22 | 23 | /* Block states (auto storage) */ 24 | DW_untitled12_T untitled12_DW; 25 | 26 | /* Real-time model */ 27 | RT_MODEL_untitled12_T untitled12_M_; 28 | RT_MODEL_untitled12_T *const untitled12_M = &untitled12_M_; 29 | 30 | /* Model output function */ 31 | void untitled12_output(void) 32 | { 33 | uint16_T rtb_Output_f; 34 | uint8_T tmp; 35 | 36 | /* UnitDelay: '/Output' */ 37 | rtb_Output_f = untitled12_DW.Output_DSTATE; 38 | 39 | /* DataTypeConversion: '/Data Type Conversion' incorporates: 40 | * Constant: '/Vector' 41 | * MultiPortSwitch: '/Output' 42 | * UnitDelay: '/Output' 43 | */ 44 | if (untitled12_P.Vector_Value[untitled12_DW.Output_DSTATE] < 256.0) { 45 | if (untitled12_P.Vector_Value[untitled12_DW.Output_DSTATE] >= 0.0) { 46 | tmp = (uint8_T)untitled12_P.Vector_Value[untitled12_DW.Output_DSTATE]; 47 | } else { 48 | tmp = 0U; 49 | } 50 | } else { 51 | tmp = MAX_uint8_T; 52 | } 53 | 54 | /* End of DataTypeConversion: '/Data Type Conversion' */ 55 | 56 | /* S-Function (arduinoservowrite_sfcn): '/Servo Write' */ 57 | MW_servoWrite(untitled12_P.ServoWrite_p1, tmp); 58 | 59 | /* Sum: '/FixPt Sum1' incorporates: 60 | * Constant: '/FixPt Constant' 61 | */ 62 | rtb_Output_f += untitled12_P.FixPtConstant_Value; 63 | 64 | /* Switch: '/FixPt Switch' incorporates: 65 | * Constant: '/Constant' 66 | */ 67 | if (rtb_Output_f > untitled12_P.FixPtSwitch_Threshold) { 68 | untitled12_B.FixPtSwitch = untitled12_P.Constant_Value; 69 | } else { 70 | untitled12_B.FixPtSwitch = rtb_Output_f; 71 | } 72 | 73 | /* End of Switch: '/FixPt Switch' */ 74 | } 75 | 76 | /* Model update function */ 77 | void untitled12_update(void) 78 | { 79 | /* Update for UnitDelay: '/Output' */ 80 | untitled12_DW.Output_DSTATE = untitled12_B.FixPtSwitch; 81 | } 82 | 83 | /* Model initialize function */ 84 | void untitled12_initialize(void) 85 | { 86 | /* Registration code */ 87 | 88 | /* initialize error status */ 89 | rtmSetErrorStatus(untitled12_M, (NULL)); 90 | 91 | /* block I/O */ 92 | (void) memset(((void *) &untitled12_B), 0, 93 | sizeof(B_untitled12_T)); 94 | 95 | /* states (dwork) */ 96 | (void) memset((void *)&untitled12_DW, 0, 97 | sizeof(DW_untitled12_T)); 98 | 99 | /* Start for S-Function (arduinoservowrite_sfcn): '/Servo Write' */ 100 | MW_servoAttach(untitled12_P.ServoWrite_p1, untitled12_P.ServoWrite_p2); 101 | 102 | /* InitializeConditions for UnitDelay: '/Output' */ 103 | untitled12_DW.Output_DSTATE = untitled12_P.Output_InitialCondition; 104 | } 105 | 106 | /* Model terminate function */ 107 | void untitled12_terminate(void) 108 | { 109 | /* (no terminate code required) */ 110 | } 111 | 112 | /* 113 | * File trailer for generated code. 114 | * 115 | * [EOF] 116 | */ 117 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: untitled12.h 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_untitled12_h_ 18 | #define RTW_HEADER_untitled12_h_ 19 | #ifndef untitled12_COMMON_INCLUDES_ 20 | # define untitled12_COMMON_INCLUDES_ 21 | #include 22 | #include 23 | #include "rtwtypes.h" 24 | #include "rtw_continuous.h" 25 | #include "rtw_solver.h" 26 | #include "arduino_servowrite_lct.h" 27 | #endif /* untitled12_COMMON_INCLUDES_ */ 28 | 29 | #include "untitled12_types.h" 30 | 31 | /* Macros for accessing real-time model data structure */ 32 | #ifndef rtmGetErrorStatus 33 | # define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) 34 | #endif 35 | 36 | #ifndef rtmSetErrorStatus 37 | # define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) 38 | #endif 39 | 40 | /* Block signals (auto storage) */ 41 | typedef struct { 42 | uint16_T FixPtSwitch; /* '/FixPt Switch' */ 43 | } B_untitled12_T; 44 | 45 | /* Block states (auto storage) for system '' */ 46 | typedef struct { 47 | uint16_T Output_DSTATE; /* '/Output' */ 48 | } DW_untitled12_T; 49 | 50 | /* Parameters (auto storage) */ 51 | struct P_untitled12_T_ { 52 | real_T Vector_Value[360]; /* Expression: OutValues 53 | * Referenced by: '/Vector' 54 | */ 55 | uint32_T ServoWrite_p2; /* Computed Parameter: ServoWrite_p2 56 | * Referenced by: '/Servo Write' 57 | */ 58 | uint16_T Constant_Value; /* Computed Parameter: Constant_Value 59 | * Referenced by: '/Constant' 60 | */ 61 | uint16_T Output_InitialCondition; /* Computed Parameter: Output_InitialCondition 62 | * Referenced by: '/Output' 63 | */ 64 | uint16_T FixPtConstant_Value; /* Computed Parameter: FixPtConstant_Value 65 | * Referenced by: '/FixPt Constant' 66 | */ 67 | uint16_T FixPtSwitch_Threshold; /* Computed Parameter: FixPtSwitch_Threshold 68 | * Referenced by: '/FixPt Switch' 69 | */ 70 | uint8_T ServoWrite_p1; /* Computed Parameter: ServoWrite_p1 71 | * Referenced by: '/Servo Write' 72 | */ 73 | }; 74 | 75 | /* Real-time Model Data Structure */ 76 | struct tag_RTM_untitled12_T { 77 | const char_T * volatile errorStatus; 78 | }; 79 | 80 | /* Block parameters (auto storage) */ 81 | extern P_untitled12_T untitled12_P; 82 | 83 | /* Block signals (auto storage) */ 84 | extern B_untitled12_T untitled12_B; 85 | 86 | /* Block states (auto storage) */ 87 | extern DW_untitled12_T untitled12_DW; 88 | 89 | /* Model entry point functions */ 90 | extern void untitled12_initialize(void); 91 | extern void untitled12_output(void); 92 | extern void untitled12_update(void); 93 | extern void untitled12_terminate(void); 94 | 95 | /* Real-time Model object */ 96 | extern RT_MODEL_untitled12_T *const untitled12_M; 97 | 98 | /*- 99 | * The generated code includes comments that allow you to trace directly 100 | * back to the appropriate location in the model. The basic format 101 | * is /block_name, where system is the system number (uniquely 102 | * assigned by Simulink) and block_name is the name of the block. 103 | * 104 | * Use the MATLAB hilite_system command to trace the generated code back 105 | * to the model. For example, 106 | * 107 | * hilite_system('') - opens system 3 108 | * hilite_system('/Kp') - opens and selects block Kp which resides in S3 109 | * 110 | * Here is the system hierarchy for this model 111 | * 112 | * '' : 'untitled12' 113 | * '' : 'untitled12/Repeating Sequence Stair' 114 | * '' : 'untitled12/Standard Servo Write' 115 | * '' : 'untitled12/Repeating Sequence Stair/LimitedCounter' 116 | * '' : 'untitled12/Repeating Sequence Stair/LimitedCounter/Increment Real World' 117 | * '' : 'untitled12/Repeating Sequence Stair/LimitedCounter/Wrap To Zero' 118 | */ 119 | #endif /* RTW_HEADER_untitled12_h_ */ 120 | 121 | /* 122 | * File trailer for generated code. 123 | * 124 | * [EOF] 125 | */ 126 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_data.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: untitled12_data.c 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #include "untitled12.h" 18 | #include "untitled12_private.h" 19 | 20 | /* Block parameters (auto storage) */ 21 | P_untitled12_T untitled12_P = { 22 | /* Expression: OutValues 23 | * Referenced by: '/Vector' 24 | */ 25 | { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 26 | 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27 | 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 28 | 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 29 | 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 30 | 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 31 | 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 32 | 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0, 102.0, 103.0, 33 | 104.0, 105.0, 106.0, 107.0, 108.0, 109.0, 110.0, 111.0, 112.0, 113.0, 114.0, 34 | 115.0, 116.0, 117.0, 118.0, 119.0, 120.0, 121.0, 122.0, 123.0, 124.0, 125.0, 35 | 126.0, 127.0, 128.0, 129.0, 130.0, 131.0, 132.0, 133.0, 134.0, 135.0, 136.0, 36 | 137.0, 138.0, 139.0, 140.0, 141.0, 142.0, 143.0, 144.0, 145.0, 146.0, 147.0, 37 | 148.0, 149.0, 150.0, 151.0, 152.0, 153.0, 154.0, 155.0, 156.0, 157.0, 158.0, 38 | 159.0, 160.0, 161.0, 162.0, 163.0, 164.0, 165.0, 166.0, 167.0, 168.0, 169.0, 39 | 170.0, 171.0, 172.0, 173.0, 174.0, 175.0, 176.0, 177.0, 178.0, 179.0, 180.0, 40 | 179.0, 178.0, 177.0, 176.0, 175.0, 174.0, 173.0, 172.0, 171.0, 170.0, 169.0, 41 | 168.0, 167.0, 166.0, 165.0, 164.0, 163.0, 162.0, 161.0, 160.0, 159.0, 158.0, 42 | 157.0, 156.0, 155.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, 148.0, 147.0, 43 | 146.0, 145.0, 144.0, 143.0, 142.0, 141.0, 140.0, 139.0, 138.0, 137.0, 136.0, 44 | 135.0, 134.0, 133.0, 132.0, 131.0, 130.0, 129.0, 128.0, 127.0, 126.0, 125.0, 45 | 124.0, 123.0, 122.0, 121.0, 120.0, 119.0, 118.0, 117.0, 116.0, 115.0, 114.0, 46 | 113.0, 112.0, 111.0, 110.0, 109.0, 108.0, 107.0, 106.0, 105.0, 104.0, 103.0, 47 | 102.0, 101.0, 100.0, 99.0, 98.0, 97.0, 96.0, 95.0, 94.0, 93.0, 92.0, 91.0, 48 | 90.0, 89.0, 88.0, 87.0, 86.0, 85.0, 84.0, 83.0, 82.0, 81.0, 80.0, 79.0, 78.0, 49 | 77.0, 76.0, 75.0, 74.0, 73.0, 72.0, 71.0, 70.0, 69.0, 68.0, 67.0, 66.0, 65.0, 50 | 64.0, 63.0, 62.0, 61.0, 60.0, 59.0, 58.0, 57.0, 56.0, 55.0, 54.0, 53.0, 52.0, 51 | 51.0, 50.0, 49.0, 48.0, 47.0, 46.0, 45.0, 44.0, 43.0, 42.0, 41.0, 40.0, 39.0, 52 | 38.0, 37.0, 36.0, 35.0, 34.0, 33.0, 32.0, 31.0, 30.0, 29.0, 28.0, 27.0, 26.0, 53 | 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 54 | 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 }, 55 | 4U, /* Computed Parameter: ServoWrite_p2 56 | * Referenced by: '/Servo Write' 57 | */ 58 | 0U, /* Computed Parameter: Constant_Value 59 | * Referenced by: '/Constant' 60 | */ 61 | 0U, /* Computed Parameter: Output_InitialCondition 62 | * Referenced by: '/Output' 63 | */ 64 | 1U, /* Computed Parameter: FixPtConstant_Value 65 | * Referenced by: '/FixPt Constant' 66 | */ 67 | 359U, /* Computed Parameter: FixPtSwitch_Threshold 68 | * Referenced by: '/FixPt Switch' 69 | */ 70 | 0U /* Computed Parameter: ServoWrite_p1 71 | * Referenced by: '/Servo Write' 72 | */ 73 | }; 74 | 75 | /* 76 | * File trailer for generated code. 77 | * 78 | * [EOF] 79 | */ 80 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_data.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_data.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: untitled12_private.h 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_untitled12_private_h_ 18 | #define RTW_HEADER_untitled12_private_h_ 19 | #include "rtwtypes.h" 20 | #ifndef __RTWTYPES_H__ 21 | #error This file requires rtwtypes.h to be included 22 | #else 23 | #ifdef TMWTYPES_PREVIOUSLY_INCLUDED 24 | #error This file requires rtwtypes.h to be included before tmwtypes.h 25 | #else 26 | 27 | /* Check for inclusion of an incorrect version of rtwtypes.h */ 28 | #ifndef RTWTYPES_ID_C08S16I16L32N08F1 29 | #error This code was generated with a different "rtwtypes.h" than the file included 30 | #endif /* RTWTYPES_ID_C08S16I16L32N08F1 */ 31 | #endif /* TMWTYPES_PREVIOUSLY_INCLUDED */ 32 | #endif /* __RTWTYPES_H__ */ 33 | #endif /* RTW_HEADER_untitled12_private_h_ */ 34 | 35 | /* 36 | * File trailer for generated code. 37 | * 38 | * [EOF] 39 | */ 40 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_ref.rsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_ref.rsp -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/untitled12_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: untitled12_types.h 3 | * 4 | * Code generated for Simulink model 'untitled12'. 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * TLC version : 8.4 (Jan 19 2013) 9 | * C/C++ source code generated on : Sat Apr 23 20:11:21 2016 10 | * 11 | * Target selection: realtime.tlc 12 | * Embedded hardware selection: Atmel->AVR 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_untitled12_types_h_ 18 | #define RTW_HEADER_untitled12_types_h_ 19 | #include "rtwtypes.h" 20 | #ifndef SS_LONG 21 | #define SS_LONG 14 22 | #endif 23 | 24 | #ifndef SS_ULONG 25 | #define SS_ULONG 15 26 | #endif 27 | 28 | /* Parameters (auto storage) */ 29 | typedef struct P_untitled12_T_ P_untitled12_T; 30 | 31 | /* Forward declaration for rtModel */ 32 | typedef struct tag_RTM_untitled12_T RT_MODEL_untitled12_T; 33 | 34 | #endif /* RTW_HEADER_untitled12_types_h_ */ 35 | 36 | /* 37 | * File trailer for generated code. 38 | * 39 | * [EOF] 40 | */ 41 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring_analog.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring_analog.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring_digital.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_digital.c - digital input and output functions 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | Modified 28 September 2010 by Mark Sproul 23 | 24 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 25 | */ 26 | 27 | #define ARDUINO_MAIN 28 | #include "wiring_private.h" 29 | #include "pins_arduino.h" 30 | 31 | void pinMode(uint8_t pin, uint8_t mode) 32 | { 33 | uint8_t bit = digitalPinToBitMask(pin); 34 | uint8_t port = digitalPinToPort(pin); 35 | volatile uint8_t *reg; 36 | 37 | if (port == NOT_A_PIN) return; 38 | 39 | // JWS: can I let the optimizer do this? 40 | reg = portModeRegister(port); 41 | 42 | if (mode == INPUT) { 43 | uint8_t oldSREG = SREG; 44 | cli(); 45 | *reg &= ~bit; 46 | SREG = oldSREG; 47 | } else { 48 | uint8_t oldSREG = SREG; 49 | cli(); 50 | *reg |= bit; 51 | SREG = oldSREG; 52 | } 53 | } 54 | 55 | // Forcing this inline keeps the callers from having to push their own stuff 56 | // on the stack. It is a good performance win and only takes 1 more byte per 57 | // user than calling. (It will take more bytes on the 168.) 58 | // 59 | // But shouldn't this be moved into pinMode? Seems silly to check and do on 60 | // each digitalread or write. 61 | // 62 | // Mark Sproul: 63 | // - Removed inline. Save 170 bytes on atmega1280 64 | // - changed to a switch statment; added 32 bytes but much easier to read and maintain. 65 | // - Added more #ifdefs, now compiles for atmega645 66 | // 67 | //static inline void turnOffPWM(uint8_t timer) __attribute__ ((always_inline)); 68 | //static inline void turnOffPWM(uint8_t timer) 69 | static void turnOffPWM(uint8_t timer) 70 | { 71 | switch (timer) 72 | { 73 | #if defined(TCCR1A) && defined(COM1A1) 74 | case TIMER1A: cbi(TCCR1A, COM1A1); break; 75 | #endif 76 | #if defined(TCCR1A) && defined(COM1B1) 77 | case TIMER1B: cbi(TCCR1A, COM1B1); break; 78 | #endif 79 | 80 | #if defined(TCCR2) && defined(COM21) 81 | case TIMER2: cbi(TCCR2, COM21); break; 82 | #endif 83 | 84 | #if defined(TCCR0A) && defined(COM0A1) 85 | case TIMER0A: cbi(TCCR0A, COM0A1); break; 86 | #endif 87 | 88 | #if defined(TIMER0B) && defined(COM0B1) 89 | case TIMER0B: cbi(TCCR0A, COM0B1); break; 90 | #endif 91 | #if defined(TCCR2A) && defined(COM2A1) 92 | case TIMER2A: cbi(TCCR2A, COM2A1); break; 93 | #endif 94 | #if defined(TCCR2A) && defined(COM2B1) 95 | case TIMER2B: cbi(TCCR2A, COM2B1); break; 96 | #endif 97 | 98 | #if defined(TCCR3A) && defined(COM3A1) 99 | case TIMER3A: cbi(TCCR3A, COM3A1); break; 100 | #endif 101 | #if defined(TCCR3A) && defined(COM3B1) 102 | case TIMER3B: cbi(TCCR3A, COM3B1); break; 103 | #endif 104 | #if defined(TCCR3A) && defined(COM3C1) 105 | case TIMER3C: cbi(TCCR3A, COM3C1); break; 106 | #endif 107 | 108 | #if defined(TCCR4A) && defined(COM4A1) 109 | case TIMER4A: cbi(TCCR4A, COM4A1); break; 110 | #endif 111 | #if defined(TCCR4A) && defined(COM4B1) 112 | case TIMER4B: cbi(TCCR4A, COM4B1); break; 113 | #endif 114 | #if defined(TCCR4A) && defined(COM4C1) 115 | case TIMER4C: cbi(TCCR4A, COM4C1); break; 116 | #endif 117 | #if defined(TCCR5A) 118 | case TIMER5A: cbi(TCCR5A, COM5A1); break; 119 | case TIMER5B: cbi(TCCR5A, COM5B1); break; 120 | case TIMER5C: cbi(TCCR5A, COM5C1); break; 121 | #endif 122 | } 123 | } 124 | 125 | void digitalWrite(uint8_t pin, uint8_t val) 126 | { 127 | uint8_t timer = digitalPinToTimer(pin); 128 | uint8_t bit = digitalPinToBitMask(pin); 129 | uint8_t port = digitalPinToPort(pin); 130 | volatile uint8_t *out; 131 | 132 | if (port == NOT_A_PIN) return; 133 | 134 | // If the pin that support PWM output, we need to turn it off 135 | // before doing a digital write. 136 | if (timer != NOT_ON_TIMER) turnOffPWM(timer); 137 | 138 | out = portOutputRegister(port); 139 | 140 | uint8_t oldSREG = SREG; 141 | cli(); 142 | 143 | if (val == LOW) { 144 | *out &= ~bit; 145 | } else { 146 | *out |= bit; 147 | } 148 | 149 | SREG = oldSREG; 150 | } 151 | 152 | int digitalRead(uint8_t pin) 153 | { 154 | uint8_t timer = digitalPinToTimer(pin); 155 | uint8_t bit = digitalPinToBitMask(pin); 156 | uint8_t port = digitalPinToPort(pin); 157 | 158 | if (port == NOT_A_PIN) return LOW; 159 | 160 | // If the pin that support PWM output, we need to turn it off 161 | // before getting a digital reading. 162 | if (timer != NOT_ON_TIMER) turnOffPWM(timer); 163 | 164 | if (*portInputRegister(port) & bit) return HIGH; 165 | return LOW; 166 | } 167 | -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring_digital.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/.SimulinkProject/Root.type.Categories/untitled12_rtt/wiring_digital.o -------------------------------------------------------------------------------- /everything _about_SBRobots/.SimulinkProject/uuid-19a689ed-04d1-4dcd-8fab-a02b8a3d89fb.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/5616-les-technologies-mems-ens.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/5616-les-technologies-mems-ens.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://blog.tkjelectronics.dk/2012/09/a-practical-approach-to-kalman-filter-and-how-to-implement-it/ 2 | 3 | http://diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A23188 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | http://www.nxhlh.com/stag/complementary-filter-arduino/ complementary-filter -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/filter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Kalman/filter.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/kalamn.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Kalman/kalamn.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/kalman.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Kalman/kalman.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/kalman_intro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Kalman/kalman_intro.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/Kalman/~$kalamn.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Kalman/~$kalamn.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/Nouveau dossier/F34KFSLHV3QD55N.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Nouveau dossier/F34KFSLHV3QD55N.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/Nouveau dossier/FNJ66JVHV3QD55O.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Nouveau dossier/FNJ66JVHV3QD55O.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/Nouveau dossier/FTTGGM6HV3QD55I.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Nouveau dossier/FTTGGM6HV3QD55I.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/Nouveau dossier/lkjhjk.txt: -------------------------------------------------------------------------------- 1 | http://www.instructables.com/id/Self-Balancing-Robot/ -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/2.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/2.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/3.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/3.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/4.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/4.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/5.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/5.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/6.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/6.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/7.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/7.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/8.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/8.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Improving the Beginner/Improving the Beginner1.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Improving the Beginner/Improving the Beginner1.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Nouveau Document Microsoft Office Word.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Nouveau Document Microsoft Office Word.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Nouveau document texte.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Nouveau document texte.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/Proportional Integral Derivative.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/Proportional Integral Derivative.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/astrom-ch6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/astrom-ch6.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/correcteur_pid.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/correcteur_pid.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/PID/pid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/PID/pid.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/Screenshot_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Screenshot_00.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Extensions.type.Root/Information.type.Extension.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/ProjectData.type.Info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/.SimulinkProject/uuid-b5eb2254-f494-4767-8215-317f3f6771e2.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/ProjectData.type.Info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/.SimulinkProject/uuid-eefbeea8-bb88-4c39-aaa4-58f1aa3c2f40.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/untitled.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/542/untitled.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/542/untitled415.prj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is a Simulink Project 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://www.ladyada.net/learn/arduino/ 2 | 3 | http://arduino.stackexchange.com/questions?page=5&sort=newest question and answer about arduino 4 | 5 | http://f-leb.developpez.com/tutoriels/arduino/univers_arduino/part1/ -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/jiho.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Sat Apr 23 12:41:07 2016 IM -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/matlab1.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Sat Apr 23 12:39:27 2016 IM -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/slprj/grt/_sharedutils/shared_file.sldd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/slprj/grt/_sharedutils/shared_file.sldd -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/slprj/grt/_sharedutils/shared_file.slddc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/slprj/grt/_sharedutils/shared_file.slddc -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/slprj/grt/_sharedutils/tflSUInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/slprj/grt/_sharedutils/tflSUInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/slprj/grt/untitled/tmwinternal/minfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/slprj/grt/untitled/tmwinternal/minfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/slprj/sl_proj.tmw: -------------------------------------------------------------------------------- 1 | Simulink Coder project marker file. Please don't change it. 2 | slprjVersion: 8.1_44_002 -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled458.prj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is a Simulink Project 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled755.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled755.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled7554.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled7554.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/buildInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled_grt_rtw/buildInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/build_exception.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled_grt_rtw/build_exception.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/codeInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled_grt_rtw/codeInfo.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/defines.txt: -------------------------------------------------------------------------------- 1 | MODEL=untitled 2 | NUMST=1 3 | NCSTATES=0 4 | HAVESTDIO 5 | RT 6 | USE_RTMODEL 7 | MAT_FILE=1 8 | INTEGER_CODE=0 9 | MT=0 10 | CLASSIC_INTERFACE=0 11 | ONESTEPFCN=1 12 | TERMFCN=1 13 | MULTI_INSTANCE_CODE=0 14 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/modelsources.txt: -------------------------------------------------------------------------------- 1 | untitled.c rt_logging.c 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtGetInf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rtGetInf.c 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | /* 17 | * Abstract: 18 | * Function to intialize non-finite, Inf 19 | */ 20 | 21 | #include "rtGetInf.h" 22 | #define NumBitsPerChar 8U 23 | 24 | /* 25 | * Initialize rtInf needed by the generated code. 26 | * Inf is initialized as non-signaling. Assumes IEEE. 27 | */ 28 | real_T rtGetInf(void) 29 | { 30 | size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar); 31 | real_T inf = 0.0; 32 | if (bitsPerReal == 32U) { 33 | inf = rtGetInfF(); 34 | } else { 35 | uint16_T one = 1U; 36 | enum { 37 | LittleEndian, 38 | BigEndian 39 | } machByteOrder = (*((uint8_T *) &one) == 1U) ? LittleEndian : BigEndian; 40 | switch (machByteOrder) { 41 | case LittleEndian: 42 | { 43 | union { 44 | LittleEndianIEEEDouble bitVal; 45 | real_T fltVal; 46 | } tmpVal; 47 | 48 | tmpVal.bitVal.words.wordH = 0x7FF00000U; 49 | tmpVal.bitVal.words.wordL = 0x00000000U; 50 | inf = tmpVal.fltVal; 51 | break; 52 | } 53 | 54 | case BigEndian: 55 | { 56 | union { 57 | BigEndianIEEEDouble bitVal; 58 | real_T fltVal; 59 | } tmpVal; 60 | 61 | tmpVal.bitVal.words.wordH = 0x7FF00000U; 62 | tmpVal.bitVal.words.wordL = 0x00000000U; 63 | inf = tmpVal.fltVal; 64 | break; 65 | } 66 | } 67 | } 68 | 69 | return inf; 70 | } 71 | 72 | /* 73 | * Initialize rtInfF needed by the generated code. 74 | * Inf is initialized as non-signaling. Assumes IEEE. 75 | */ 76 | real32_T rtGetInfF(void) 77 | { 78 | IEEESingle infF; 79 | infF.wordL.wordLuint = 0x7F800000U; 80 | return infF.wordL.wordLreal; 81 | } 82 | 83 | /* 84 | * Initialize rtMinusInf needed by the generated code. 85 | * Inf is initialized as non-signaling. Assumes IEEE. 86 | */ 87 | real_T rtGetMinusInf(void) 88 | { 89 | size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar); 90 | real_T minf = 0.0; 91 | if (bitsPerReal == 32U) { 92 | minf = rtGetMinusInfF(); 93 | } else { 94 | uint16_T one = 1U; 95 | enum { 96 | LittleEndian, 97 | BigEndian 98 | } machByteOrder = (*((uint8_T *) &one) == 1U) ? LittleEndian : BigEndian; 99 | switch (machByteOrder) { 100 | case LittleEndian: 101 | { 102 | union { 103 | LittleEndianIEEEDouble bitVal; 104 | real_T fltVal; 105 | } tmpVal; 106 | 107 | tmpVal.bitVal.words.wordH = 0xFFF00000U; 108 | tmpVal.bitVal.words.wordL = 0x00000000U; 109 | minf = tmpVal.fltVal; 110 | break; 111 | } 112 | 113 | case BigEndian: 114 | { 115 | union { 116 | BigEndianIEEEDouble bitVal; 117 | real_T fltVal; 118 | } tmpVal; 119 | 120 | tmpVal.bitVal.words.wordH = 0xFFF00000U; 121 | tmpVal.bitVal.words.wordL = 0x00000000U; 122 | minf = tmpVal.fltVal; 123 | break; 124 | } 125 | } 126 | } 127 | 128 | return minf; 129 | } 130 | 131 | /* 132 | * Initialize rtMinusInfF needed by the generated code. 133 | * Inf is initialized as non-signaling. Assumes IEEE. 134 | */ 135 | real32_T rtGetMinusInfF(void) 136 | { 137 | IEEESingle minfF; 138 | minfF.wordL.wordLuint = 0xFF800000U; 139 | return minfF.wordL.wordLreal; 140 | } 141 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtGetInf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rtGetInf.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_rtGetInf_h_ 18 | #define RTW_HEADER_rtGetInf_h_ 19 | #include 20 | #include "rtwtypes.h" 21 | #include "rt_nonfinite.h" 22 | 23 | extern real_T rtGetInf(void); 24 | extern real32_T rtGetInfF(void); 25 | extern real_T rtGetMinusInf(void); 26 | extern real32_T rtGetMinusInfF(void); 27 | 28 | #endif /* RTW_HEADER_rtGetInf_h_ */ 29 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtGetNaN.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rtGetNaN.c 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | /* 17 | * Abstract: 18 | * Function to intialize non-finite, NaN 19 | */ 20 | 21 | #include "rtGetNaN.h" 22 | #define NumBitsPerChar 8U 23 | 24 | /* 25 | * Initialize rtNaN needed by the generated code. 26 | * NaN is initialized as non-signaling. Assumes IEEE. 27 | */ 28 | real_T rtGetNaN(void) 29 | { 30 | size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar); 31 | real_T nan = 0.0; 32 | if (bitsPerReal == 32U) { 33 | nan = rtGetNaNF(); 34 | } else { 35 | uint16_T one = 1U; 36 | enum { 37 | LittleEndian, 38 | BigEndian 39 | } machByteOrder = (*((uint8_T *) &one) == 1U) ? LittleEndian : BigEndian; 40 | switch (machByteOrder) { 41 | case LittleEndian: 42 | { 43 | union { 44 | LittleEndianIEEEDouble bitVal; 45 | real_T fltVal; 46 | } tmpVal; 47 | 48 | tmpVal.bitVal.words.wordH = 0xFFF80000U; 49 | tmpVal.bitVal.words.wordL = 0x00000000U; 50 | nan = tmpVal.fltVal; 51 | break; 52 | } 53 | 54 | case BigEndian: 55 | { 56 | union { 57 | BigEndianIEEEDouble bitVal; 58 | real_T fltVal; 59 | } tmpVal; 60 | 61 | tmpVal.bitVal.words.wordH = 0x7FFFFFFFU; 62 | tmpVal.bitVal.words.wordL = 0xFFFFFFFFU; 63 | nan = tmpVal.fltVal; 64 | break; 65 | } 66 | } 67 | } 68 | 69 | return nan; 70 | } 71 | 72 | /* 73 | * Initialize rtNaNF needed by the generated code. 74 | * NaN is initialized as non-signaling. Assumes IEEE. 75 | */ 76 | real32_T rtGetNaNF(void) 77 | { 78 | IEEESingle nanF = { { 0 } }; 79 | 80 | uint16_T one = 1U; 81 | enum { 82 | LittleEndian, 83 | BigEndian 84 | } machByteOrder = (*((uint8_T *) &one) == 1U) ? LittleEndian : BigEndian; 85 | switch (machByteOrder) { 86 | case LittleEndian: 87 | { 88 | nanF.wordL.wordLuint = 0xFFC00000U; 89 | break; 90 | } 91 | 92 | case BigEndian: 93 | { 94 | nanF.wordL.wordLuint = 0x7FFFFFFFU; 95 | break; 96 | } 97 | } 98 | 99 | return nanF.wordL.wordLreal; 100 | } 101 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtGetNaN.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rtGetNaN.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_rtGetNaN_h_ 18 | #define RTW_HEADER_rtGetNaN_h_ 19 | #include 20 | #include "rtwtypes.h" 21 | #include "rt_nonfinite.h" 22 | 23 | extern real_T rtGetNaN(void); 24 | extern real32_T rtGetNaNF(void); 25 | 26 | #endif /* RTW_HEADER_rtGetNaN_h_ */ 27 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rt_nonfinite.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rt_nonfinite.c 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | /* 17 | * Abstract: 18 | * Function to intialize non-finites, 19 | * (Inf, NaN and -Inf). 20 | */ 21 | 22 | #include "rt_nonfinite.h" 23 | #include "rtGetNaN.h" 24 | #include "rtGetInf.h" 25 | 26 | real_T rtInf; 27 | real_T rtMinusInf; 28 | real_T rtNaN; 29 | real32_T rtInfF; 30 | real32_T rtMinusInfF; 31 | real32_T rtNaNF; 32 | 33 | /* 34 | * Initialize the rtInf, rtMinusInf, and rtNaN needed by the 35 | * generated code. NaN is initialized as non-signaling. Assumes IEEE. 36 | */ 37 | void rt_InitInfAndNaN(size_t realSize) 38 | { 39 | (void) (realSize); 40 | rtNaN = rtGetNaN(); 41 | rtNaNF = rtGetNaNF(); 42 | rtInf = rtGetInf(); 43 | rtInfF = rtGetInfF(); 44 | rtMinusInf = rtGetMinusInf(); 45 | rtMinusInfF = rtGetMinusInfF(); 46 | } 47 | 48 | /* Test if value is infinite */ 49 | boolean_T rtIsInf(real_T value) 50 | { 51 | return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U); 52 | } 53 | 54 | /* Test if single-precision value is infinite */ 55 | boolean_T rtIsInfF(real32_T value) 56 | { 57 | return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U); 58 | } 59 | 60 | /* Test if value is not a number */ 61 | boolean_T rtIsNaN(real_T value) 62 | { 63 | return (boolean_T)((value!=value) ? 1U : 0U); 64 | } 65 | 66 | /* Test if single-precision value is not a number */ 67 | boolean_T rtIsNaNF(real32_T value) 68 | { 69 | return (boolean_T)(((value!=value) ? 1U : 0U)); 70 | } 71 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rt_nonfinite.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rt_nonfinite.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | 17 | #ifndef RTW_HEADER_rt_nonfinite_h_ 18 | #define RTW_HEADER_rt_nonfinite_h_ 19 | #include 20 | #include "rtwtypes.h" 21 | 22 | extern real_T rtInf; 23 | extern real_T rtMinusInf; 24 | extern real_T rtNaN; 25 | extern real32_T rtInfF; 26 | extern real32_T rtMinusInfF; 27 | extern real32_T rtNaNF; 28 | extern void rt_InitInfAndNaN(size_t realSize); 29 | extern boolean_T rtIsInf(real_T value); 30 | extern boolean_T rtIsInfF(real32_T value); 31 | extern boolean_T rtIsNaN(real_T value); 32 | extern boolean_T rtIsNaNF(real32_T value); 33 | typedef struct { 34 | struct { 35 | uint32_T wordH; 36 | uint32_T wordL; 37 | } words; 38 | } BigEndianIEEEDouble; 39 | 40 | typedef struct { 41 | struct { 42 | uint32_T wordL; 43 | uint32_T wordH; 44 | } words; 45 | } LittleEndianIEEEDouble; 46 | 47 | typedef struct { 48 | union { 49 | real32_T wordLreal; 50 | uint32_T wordLuint; 51 | } wordL; 52 | } IEEESingle; 53 | 54 | #endif /* RTW_HEADER_rt_nonfinite_h_ */ 55 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtmodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rtmodel.h: 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #ifndef RTW_HEADER_rtmodel_h_ 17 | #define RTW_HEADER_rtmodel_h_ 18 | 19 | /* 20 | * Includes the appropriate headers when we are using rtModel 21 | */ 22 | #include "untitled.h" 23 | #define GRTINTERFACE 0 24 | #if MAT_FILE == 1 25 | # define rt_StartDataLogging(S,T,U,V) NULL 26 | # define rt_UpdateTXYLogVars(S,T) NULL 27 | # define rt_UpdateSigLogVars(S,T) ; /* No op */ 28 | #endif 29 | 30 | #if defined(EXT_MODE) 31 | # define rtExtModeUploadCheckTrigger(S) /* No op */ 32 | # define rtExtModeUpload(S,T) /* No op */ 33 | #endif 34 | #endif /* RTW_HEADER_rtmodel_h_ */ 35 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtw_proj.tmw: -------------------------------------------------------------------------------- 1 | Simulink Coder project for untitled using C:\Program Files\MATLAB\R2013a\rtw\c\grt\grt_vcx64.tmf. MATLAB root = C:\Program Files\MATLAB\R2013a. SimStruct date: 09-nov.-2012 01:00:10 2 | This file is generated by Simulink Coder for use by the make utility 3 | to determine when to rebuild objects when the name of the current Simulink Coder project changes. 4 | The rtwinfomat located at: ..\slprj\grt\untitled\tmwinternal\binfo.mat 5 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/rtwtypeschksum.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled_grt_rtw/rtwtypeschksum.mat -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled.bat: -------------------------------------------------------------------------------- 1 | call "%VS90COMNTOOLS%..\..\VC\vcvarsall.bat" AMD64 2 | 3 | cd . 4 | nmake -f untitled.mk 5 | @if errorlevel 1 goto error_exit 6 | exit /B 0 7 | 8 | :error_exit 9 | echo The make command returned an error of %errorlevel% 10 | An_error_occurred_during_the_call_to_make 11 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled.c: -------------------------------------------------------------------------------- 1 | /* 2 | * untitled.c 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #include "untitled.h" 17 | #include "untitled_private.h" 18 | 19 | /* Block states (auto storage) */ 20 | DW_untitled_T untitled_DW; 21 | 22 | /* Real-time model */ 23 | RT_MODEL_untitled_T untitled_M_; 24 | RT_MODEL_untitled_T *const untitled_M = &untitled_M_; 25 | 26 | /* Model step function */ 27 | void untitled_step(void) 28 | { 29 | uint16_T rtb_Output_h; 30 | uint8_T tmp; 31 | 32 | /* UnitDelay: '/Output' */ 33 | rtb_Output_h = untitled_DW.Output_DSTATE; 34 | 35 | /* DataTypeConversion: '/Data Type Conversion' incorporates: 36 | * Constant: '/Vector' 37 | * MultiPortSwitch: '/Output' 38 | * UnitDelay: '/Output' 39 | */ 40 | if (untitled_P.Vector_Value[untitled_DW.Output_DSTATE] < 256.0) { 41 | if (untitled_P.Vector_Value[untitled_DW.Output_DSTATE] >= 0.0) { 42 | tmp = (uint8_T)untitled_P.Vector_Value[untitled_DW.Output_DSTATE]; 43 | } else { 44 | tmp = 0U; 45 | } 46 | } else { 47 | tmp = MAX_uint8_T; 48 | } 49 | 50 | /* End of DataTypeConversion: '/Data Type Conversion' */ 51 | 52 | /* S-Function (arduinoservowrite_sfcn): '/Servo Write' */ 53 | MW_servoWrite(untitled_P.ServoWrite_p1, tmp); 54 | 55 | /* Sum: '/FixPt Sum1' incorporates: 56 | * Constant: '/FixPt Constant' 57 | */ 58 | rtb_Output_h = (uint16_T)((uint32_T)rtb_Output_h + 59 | untitled_P.FixPtConstant_Value); 60 | 61 | /* Switch: '/FixPt Switch' */ 62 | if (rtb_Output_h > untitled_P.FixPtSwitch_Threshold) { 63 | /* Update for UnitDelay: '/Output' incorporates: 64 | * Constant: '/Constant' 65 | */ 66 | untitled_DW.Output_DSTATE = untitled_P.Constant_Value; 67 | } else { 68 | /* Update for UnitDelay: '/Output' */ 69 | untitled_DW.Output_DSTATE = rtb_Output_h; 70 | } 71 | 72 | /* End of Switch: '/FixPt Switch' */ 73 | 74 | /* Matfile logging */ 75 | rt_UpdateTXYLogVars(untitled_M->rtwLogInfo, (&untitled_M->Timing.taskTime0)); 76 | 77 | /* signal main to stop simulation */ 78 | { /* Sample time: [0.01s, 0.0s] */ 79 | if ((rtmGetTFinal(untitled_M)!=-1) && 80 | !((rtmGetTFinal(untitled_M)-untitled_M->Timing.taskTime0) > 81 | untitled_M->Timing.taskTime0 * (DBL_EPSILON))) { 82 | rtmSetErrorStatus(untitled_M, "Simulation finished"); 83 | } 84 | } 85 | 86 | /* Update absolute time for base rate */ 87 | /* The "clockTick0" counts the number of times the code of this task has 88 | * been executed. The absolute time is the multiplication of "clockTick0" 89 | * and "Timing.stepSize0". Size of "clockTick0" ensures timer will not 90 | * overflow during the application lifespan selected. 91 | * Timer of this task consists of two 32 bit unsigned integers. 92 | * The two integers represent the low bits Timing.clockTick0 and the high bits 93 | * Timing.clockTickH0. When the low bit overflows to 0, the high bits increment. 94 | */ 95 | if (!(++untitled_M->Timing.clockTick0)) { 96 | ++untitled_M->Timing.clockTickH0; 97 | } 98 | 99 | untitled_M->Timing.taskTime0 = untitled_M->Timing.clockTick0 * 100 | untitled_M->Timing.stepSize0 + untitled_M->Timing.clockTickH0 * 101 | untitled_M->Timing.stepSize0 * 4294967296.0; 102 | } 103 | 104 | /* Model initialize function */ 105 | void untitled_initialize(void) 106 | { 107 | /* Registration code */ 108 | 109 | /* initialize non-finites */ 110 | rt_InitInfAndNaN(sizeof(real_T)); 111 | 112 | /* initialize real-time model */ 113 | (void) memset((void *)untitled_M, 0, 114 | sizeof(RT_MODEL_untitled_T)); 115 | rtmSetTFinal(untitled_M, 1.0); 116 | untitled_M->Timing.stepSize0 = 0.01; 117 | 118 | /* Setup for data logging */ 119 | { 120 | static RTWLogInfo rt_DataLoggingInfo; 121 | untitled_M->rtwLogInfo = &rt_DataLoggingInfo; 122 | } 123 | 124 | /* Setup for data logging */ 125 | { 126 | rtliSetLogXSignalInfo(untitled_M->rtwLogInfo, (NULL)); 127 | rtliSetLogXSignalPtrs(untitled_M->rtwLogInfo, (NULL)); 128 | rtliSetLogT(untitled_M->rtwLogInfo, "tout"); 129 | rtliSetLogX(untitled_M->rtwLogInfo, ""); 130 | rtliSetLogXFinal(untitled_M->rtwLogInfo, ""); 131 | rtliSetSigLog(untitled_M->rtwLogInfo, ""); 132 | rtliSetLogVarNameModifier(untitled_M->rtwLogInfo, "rt_"); 133 | rtliSetLogFormat(untitled_M->rtwLogInfo, 0); 134 | rtliSetLogMaxRows(untitled_M->rtwLogInfo, 1000); 135 | rtliSetLogDecimation(untitled_M->rtwLogInfo, 1); 136 | rtliSetLogY(untitled_M->rtwLogInfo, ""); 137 | rtliSetLogYSignalInfo(untitled_M->rtwLogInfo, (NULL)); 138 | rtliSetLogYSignalPtrs(untitled_M->rtwLogInfo, (NULL)); 139 | } 140 | 141 | /* states (dwork) */ 142 | (void) memset((void *)&untitled_DW, 0, 143 | sizeof(DW_untitled_T)); 144 | 145 | /* Matfile logging */ 146 | rt_StartDataLoggingWithStartTime(untitled_M->rtwLogInfo, 0.0, rtmGetTFinal 147 | (untitled_M), untitled_M->Timing.stepSize0, (&rtmGetErrorStatus(untitled_M))); 148 | 149 | /* Start for S-Function (arduinoservowrite_sfcn): '/Servo Write' */ 150 | MW_servoAttach(untitled_P.ServoWrite_p1, untitled_P.ServoWrite_p2); 151 | 152 | /* InitializeConditions for UnitDelay: '/Output' */ 153 | untitled_DW.Output_DSTATE = untitled_P.Output_InitialCondition; 154 | } 155 | 156 | /* Model terminate function */ 157 | void untitled_terminate(void) 158 | { 159 | /* (no terminate code required) */ 160 | } 161 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled.h: -------------------------------------------------------------------------------- 1 | /* 2 | * untitled.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #ifndef RTW_HEADER_untitled_h_ 17 | #define RTW_HEADER_untitled_h_ 18 | #ifndef untitled_COMMON_INCLUDES_ 19 | # define untitled_COMMON_INCLUDES_ 20 | #include 21 | #include 22 | #include 23 | #include "rtwtypes.h" 24 | #include "rtw_continuous.h" 25 | #include "rtw_solver.h" 26 | #include "rt_logging.h" 27 | #include "arduino_servowrite_lct.h" 28 | #include "rt_nonfinite.h" 29 | #endif /* untitled_COMMON_INCLUDES_ */ 30 | 31 | #include "untitled_types.h" 32 | 33 | /* Macros for accessing real-time model data structure */ 34 | #ifndef rtmGetFinalTime 35 | # define rtmGetFinalTime(rtm) ((rtm)->Timing.tFinal) 36 | #endif 37 | 38 | #ifndef rtmGetRTWLogInfo 39 | # define rtmGetRTWLogInfo(rtm) ((rtm)->rtwLogInfo) 40 | #endif 41 | 42 | #ifndef rtmGetErrorStatus 43 | # define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) 44 | #endif 45 | 46 | #ifndef rtmSetErrorStatus 47 | # define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) 48 | #endif 49 | 50 | #ifndef rtmGetStopRequested 51 | # define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag) 52 | #endif 53 | 54 | #ifndef rtmSetStopRequested 55 | # define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val)) 56 | #endif 57 | 58 | #ifndef rtmGetStopRequestedPtr 59 | # define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag)) 60 | #endif 61 | 62 | #ifndef rtmGetT 63 | # define rtmGetT(rtm) ((rtm)->Timing.taskTime0) 64 | #endif 65 | 66 | #ifndef rtmGetTFinal 67 | # define rtmGetTFinal(rtm) ((rtm)->Timing.tFinal) 68 | #endif 69 | 70 | /* Block states (auto storage) for system '' */ 71 | typedef struct { 72 | uint16_T Output_DSTATE; /* '/Output' */ 73 | } DW_untitled_T; 74 | 75 | /* Parameters (auto storage) */ 76 | struct P_untitled_T_ { 77 | real_T Vector_Value[360]; /* Expression: OutValues 78 | * Referenced by: '/Vector' 79 | */ 80 | uint32_T ServoWrite_p2; /* Computed Parameter: ServoWrite_p2 81 | * Referenced by: '/Servo Write' 82 | */ 83 | uint16_T Constant_Value; /* Computed Parameter: Constant_Value 84 | * Referenced by: '/Constant' 85 | */ 86 | uint16_T Output_InitialCondition; /* Computed Parameter: Output_InitialCondition 87 | * Referenced by: '/Output' 88 | */ 89 | uint16_T FixPtConstant_Value; /* Computed Parameter: FixPtConstant_Value 90 | * Referenced by: '/FixPt Constant' 91 | */ 92 | uint16_T FixPtSwitch_Threshold; /* Computed Parameter: FixPtSwitch_Threshold 93 | * Referenced by: '/FixPt Switch' 94 | */ 95 | uint8_T ServoWrite_p1; /* Computed Parameter: ServoWrite_p1 96 | * Referenced by: '/Servo Write' 97 | */ 98 | }; 99 | 100 | /* Real-time Model Data Structure */ 101 | struct tag_RTM_untitled_T { 102 | const char_T *errorStatus; 103 | RTWLogInfo *rtwLogInfo; 104 | 105 | /* 106 | * Timing: 107 | * The following substructure contains information regarding 108 | * the timing information for the model. 109 | */ 110 | struct { 111 | time_T taskTime0; 112 | uint32_T clockTick0; 113 | uint32_T clockTickH0; 114 | time_T stepSize0; 115 | time_T tFinal; 116 | boolean_T stopRequestedFlag; 117 | } Timing; 118 | }; 119 | 120 | /* Block parameters (auto storage) */ 121 | extern P_untitled_T untitled_P; 122 | 123 | /* Block states (auto storage) */ 124 | extern DW_untitled_T untitled_DW; 125 | 126 | /* Model entry point functions */ 127 | extern void untitled_initialize(void); 128 | extern void untitled_step(void); 129 | extern void untitled_terminate(void); 130 | 131 | /* Real-time Model object */ 132 | extern RT_MODEL_untitled_T *const untitled_M; 133 | 134 | /*- 135 | * The generated code includes comments that allow you to trace directly 136 | * back to the appropriate location in the model. The basic format 137 | * is /block_name, where system is the system number (uniquely 138 | * assigned by Simulink) and block_name is the name of the block. 139 | * 140 | * Use the MATLAB hilite_system command to trace the generated code back 141 | * to the model. For example, 142 | * 143 | * hilite_system('') - opens system 3 144 | * hilite_system('/Kp') - opens and selects block Kp which resides in S3 145 | * 146 | * Here is the system hierarchy for this model 147 | * 148 | * '' : 'untitled' 149 | * '' : 'untitled/Repeating Sequence Stair' 150 | * '' : 'untitled/Standard Servo Write' 151 | * '' : 'untitled/Repeating Sequence Stair/LimitedCounter' 152 | * '' : 'untitled/Repeating Sequence Stair/LimitedCounter/Increment Real World' 153 | * '' : 'untitled/Repeating Sequence Stair/LimitedCounter/Wrap To Zero' 154 | */ 155 | #endif /* RTW_HEADER_untitled_h_ */ 156 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled_data.c: -------------------------------------------------------------------------------- 1 | /* 2 | * untitled_data.c 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #include "untitled.h" 17 | #include "untitled_private.h" 18 | 19 | /* Block parameters (auto storage) */ 20 | P_untitled_T untitled_P = { 21 | /* Expression: OutValues 22 | * Referenced by: '/Vector' 23 | */ 24 | { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 25 | 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 26 | 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 27 | 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 28 | 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 29 | 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 30 | 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 31 | 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0, 102.0, 103.0, 32 | 104.0, 105.0, 106.0, 107.0, 108.0, 109.0, 110.0, 111.0, 112.0, 113.0, 114.0, 33 | 115.0, 116.0, 117.0, 118.0, 119.0, 120.0, 121.0, 122.0, 123.0, 124.0, 125.0, 34 | 126.0, 127.0, 128.0, 129.0, 130.0, 131.0, 132.0, 133.0, 134.0, 135.0, 136.0, 35 | 137.0, 138.0, 139.0, 140.0, 141.0, 142.0, 143.0, 144.0, 145.0, 146.0, 147.0, 36 | 148.0, 149.0, 150.0, 151.0, 152.0, 153.0, 154.0, 155.0, 156.0, 157.0, 158.0, 37 | 159.0, 160.0, 161.0, 162.0, 163.0, 164.0, 165.0, 166.0, 167.0, 168.0, 169.0, 38 | 170.0, 171.0, 172.0, 173.0, 174.0, 175.0, 176.0, 177.0, 178.0, 179.0, 180.0, 39 | 179.0, 178.0, 177.0, 176.0, 175.0, 174.0, 173.0, 172.0, 171.0, 170.0, 169.0, 40 | 168.0, 167.0, 166.0, 165.0, 164.0, 163.0, 162.0, 161.0, 160.0, 159.0, 158.0, 41 | 157.0, 156.0, 155.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, 148.0, 147.0, 42 | 146.0, 145.0, 144.0, 143.0, 142.0, 141.0, 140.0, 139.0, 138.0, 137.0, 136.0, 43 | 135.0, 134.0, 133.0, 132.0, 131.0, 130.0, 129.0, 128.0, 127.0, 126.0, 125.0, 44 | 124.0, 123.0, 122.0, 121.0, 120.0, 119.0, 118.0, 117.0, 116.0, 115.0, 114.0, 45 | 113.0, 112.0, 111.0, 110.0, 109.0, 108.0, 107.0, 106.0, 105.0, 104.0, 103.0, 46 | 102.0, 101.0, 100.0, 99.0, 98.0, 97.0, 96.0, 95.0, 94.0, 93.0, 92.0, 91.0, 47 | 90.0, 89.0, 88.0, 87.0, 86.0, 85.0, 84.0, 83.0, 82.0, 81.0, 80.0, 79.0, 78.0, 48 | 77.0, 76.0, 75.0, 74.0, 73.0, 72.0, 71.0, 70.0, 69.0, 68.0, 67.0, 66.0, 65.0, 49 | 64.0, 63.0, 62.0, 61.0, 60.0, 59.0, 58.0, 57.0, 56.0, 55.0, 54.0, 53.0, 52.0, 50 | 51.0, 50.0, 49.0, 48.0, 47.0, 46.0, 45.0, 44.0, 43.0, 42.0, 41.0, 40.0, 39.0, 51 | 38.0, 37.0, 36.0, 35.0, 34.0, 33.0, 32.0, 31.0, 30.0, 29.0, 28.0, 27.0, 26.0, 52 | 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 53 | 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 }, 54 | 4U, /* Computed Parameter: ServoWrite_p2 55 | * Referenced by: '/Servo Write' 56 | */ 57 | 0U, /* Computed Parameter: Constant_Value 58 | * Referenced by: '/Constant' 59 | */ 60 | 0U, /* Computed Parameter: Output_InitialCondition 61 | * Referenced by: '/Output' 62 | */ 63 | 1U, /* Computed Parameter: FixPtConstant_Value 64 | * Referenced by: '/FixPt Constant' 65 | */ 66 | 359U, /* Computed Parameter: FixPtSwitch_Threshold 67 | * Referenced by: '/FixPt Switch' 68 | */ 69 | 0U /* Computed Parameter: ServoWrite_p1 70 | * Referenced by: '/Servo Write' 71 | */ 72 | }; 73 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * untitled_private.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #ifndef RTW_HEADER_untitled_private_h_ 17 | #define RTW_HEADER_untitled_private_h_ 18 | #include "rtwtypes.h" 19 | 20 | /* Private macros used by the generated code to access rtModel */ 21 | #ifndef rtmSetTFinal 22 | # define rtmSetTFinal(rtm, val) ((rtm)->Timing.tFinal = (val)) 23 | #endif 24 | 25 | #ifndef rtmGetTPtr 26 | # define rtmGetTPtr(rtm) (&(rtm)->Timing.taskTime0) 27 | #endif 28 | 29 | #ifndef __RTWTYPES_H__ 30 | #error This file requires rtwtypes.h to be included 31 | #else 32 | #ifdef TMWTYPES_PREVIOUSLY_INCLUDED 33 | #error This file requires rtwtypes.h to be included before tmwtypes.h 34 | #else 35 | 36 | /* Check for inclusion of an incorrect version of rtwtypes.h */ 37 | #ifndef RTWTYPES_ID_C08S16I32L32N32F1 38 | #error This code was generated with a different "rtwtypes.h" than the file included 39 | #endif /* RTWTYPES_ID_C08S16I32L32N32F1 */ 40 | #endif /* TMWTYPES_PREVIOUSLY_INCLUDED */ 41 | #endif /* __RTWTYPES_H__ */ 42 | #endif /* RTW_HEADER_untitled_private_h_ */ 43 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled_ref.rsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/untitled_grt_rtw/untitled_ref.rsp -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/untitled_grt_rtw/untitled_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * untitled_types.h 3 | * 4 | * Code generation for model "untitled". 5 | * 6 | * Model version : 1.1 7 | * Simulink Coder version : 8.4 (R2013a) 13-Feb-2013 8 | * C source code generated on : Sat Apr 23 12:56:10 2016 9 | * 10 | * Target selection: grt.tlc 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping 12 | * Embedded hardware selection: 32-bit Generic 13 | * Code generation objectives: Unspecified 14 | * Validation result: Not run 15 | */ 16 | #ifndef RTW_HEADER_untitled_types_h_ 17 | #define RTW_HEADER_untitled_types_h_ 18 | #include "rtwtypes.h" 19 | 20 | /* Parameters (auto storage) */ 21 | typedef struct P_untitled_T_ P_untitled_T; 22 | 23 | /* Forward declaration for rtModel */ 24 | typedef struct tag_RTM_untitled_T RT_MODEL_untitled_T; 25 | 26 | #endif /* RTW_HEADER_untitled_types_h_ */ 27 | -------------------------------------------------------------------------------- /everything _about_SBRobots/arduino/uyfi.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/arduino/uyfi.slx -------------------------------------------------------------------------------- /everything _about_SBRobots/bleutooth/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=xlupRVF_6W8 Arduino Tutorial: Connect PS2 Controller to Your Arduino | Detailed Guide -------------------------------------------------------------------------------- /everything _about_SBRobots/bleutooth/Serial-Bluetooth-Arduino-Master-Slave.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/bleutooth/Serial-Bluetooth-Arduino-Master-Slave.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/2-Wheel Self Balancing Robot by using Arduino and MPU6050/FKNWUJTHVPWOS7C.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/2-Wheel Self Balancing Robot by using Arduino and MPU6050/FKNWUJTHVPWOS7C.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/2-Wheel Self Balancing Robot by using Arduino and MPU6050/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://www.instructables.com/id/2-Wheel-Self-Balancing-Robot-by-using-Arduino-and-/ 2 | 3 | -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/ARDUINO MPU 6050/ARDUINO MPU 6050.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/ARDUINO MPU 6050/ARDUINO MPU 6050.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/ARDUINO MPU 6050/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://diyhacking.com/arduino-mpu-6050-imu-sensor-tutorial/ 2 | 3 | https://www.youtube.com/watch?time_continue=2&v=ZzOAuscDIiU -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Arduino MPU6050 Balancing Bot/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=e336GLYCWEM 2 | 3 | http://www.i2cdevlib.com/devices/mpu6050#links -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/B-robot/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=V-_uxpX9aFQ youtube 2 | 3 | http://jjrobots.com/projects-2/b-robot/ main site 4 | 5 | -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Balancing robot for dummies/Caster_Bot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Balancing robot for dummies/Caster_Bot.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Balancing robot for dummies/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://barrettsprojects.wordpress.com/2013/06/13/caster-bot/ -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Balanduino (the best )/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://www.kickstarter.com/projects/tkjelectronics/balanduino-balancing-robot-kit/posts/450808 main site 5 | 6 | https://github.com/TKJElectronics/Balanduino in this site we gonna to find everything 7 | 8 | 9 | https://www.youtube.com/watch?v=m46vkNkSHv8 Balanduino Assembly Guide -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Balanduino (the best )/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Balanduino (the best )/Screenshot_2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Barrett_s Projects/Balancing Robot.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Barrett_s Projects/Balancing Robot.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Barrett_s Projects/BalancingBot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Barrett_s Projects/BalancingBot.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Barrett_s Projects/Nouveau document texte.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Barrett_s Projects/Nouveau document texte.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/Barrett_s Projects/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/Barrett_s Projects/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/RemoteController/Components.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/RemoteController/Components.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/RemoteController/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=poWP-RpPa3g 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | http://www.ablab.in/line-follower-robot-with-avr-atmega32-microcontroller-using-analog-ir-sensor/ un bon site sur les robot avec l' atmega32 26 | -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/RemoteController/astrom-ch6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/RemoteController/astrom-ch6.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/balancing I and II and III/1.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/balancing I and II and III/1.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/balancing I and II and III/2.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/balancing I and II and III/2.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/balancing I and II and III/3.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/balancing I and II and III/3.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/balanxed/BalanXedBot.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/balanxed/BalanXedBot.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/balanxed/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://elxedelectronics.blogspot.mx/ -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/making a Balancing Robot (part 1)/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=8jFh75Kwncc making a Balancing Robot (part 1) -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/BalancingRobotArduino-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/BalancingRobotArduino-master.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Nouveau document texte.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Nouveau document texte.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_10.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_11.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_4.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_5.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_6.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_8.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/objectif based on the balanduino/Screenshot_9.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/openCV/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://letsmakerobots.com/node/38610 2 | 3 | or we can use this site also 4 | 5 | http://roboticssamy.blogspot.pt/ 6 | 7 | 8 | 9 | http://www.yt.fully.pk/watch/O6XkH84JYjU un peut de fonctionnemet de robot dans ce video -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/openCV/Screenshot_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/openCV/Screenshot_3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/python robot/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://www.instructables.com/id/Chefbot-A-DIY-Autonomous-mobile-robot-for-serving-/ 2 | https://www.youtube.com/watch?v=egS3vqqtKaU 3 | http://learn-robotics.com/ -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/self balancing bot/A balancing robot kit is now avaliable via Kickstarter.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/self balancing bot/A balancing robot kit is now avaliable via Kickstarter.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/self balancing bot/KalmanFilter-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/self balancing bot/KalmanFilter-master.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/self balancing bot/Nouveau document texte.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/self balancing bot/Nouveau document texte.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/self balancing bot/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/self balancing bot/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/x-firm/EncoderTestGUI_v_1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/x-firm/EncoderTestGUI_v_1.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/x-firm/K_Bot_Encoder_Test_V_1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/x-firm/K_Bot_Encoder_Test_V_1.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/x-firm/Motor_PID_Enc_v2_Bot.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/x-firm/Motor_PID_Enc_v2_Bot.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/x-firm/Motor_PID_Enc_v2_GUI.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/diff types de robot/x-firm/Motor_PID_Enc_v2_GUI.rar -------------------------------------------------------------------------------- /everything _about_SBRobots/diff types de robot/x-firm/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://www.x-firm.com/?cat=6 -------------------------------------------------------------------------------- /everything _about_SBRobots/i2c protocole/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=UJlgND6sWHk 2 | https://learn.sparkfun.com/tutorials/i2c 3 | http://www.robot-electronics.co.uk/i2c-tutorial 4 | 5 | http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/ 6 | -------------------------------------------------------------------------------- /everything _about_SBRobots/i2c protocole/i2c_bus_specification_1995.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/i2c protocole/i2c_bus_specification_1995.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/IMU_10DOF_Kalman_Filter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/IMU_10DOF_Kalman_Filter.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=Z1M1B_719nk connection d'une carte arduino avec un MPU (youtube) 2 | 3 | http://mechatronicstutorials.blogspot.com/2014/06/real-time-2d-visualization-on-matlab.html -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/Screenshot_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/Screenshot_4.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/accelerometre/MPU6050.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/accelerometre/MPU6050.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/accelerometre/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.sparkfun.com/products/retired/844 2 | 3 | https://bayesianadventures.wordpress.com/2013/10/27/balance-good-everything-good/ 4 | 5 | -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/accelerometre/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/accelerometre/Screenshot_2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/gyroscope/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | www.instructables.com/id/ArduRoller-balance-bot/ 2 | 3 | http://www.dprg.org/projects/2003-01a/ LOW COST GYRO-ACCELEROMETER COMBO SENSOR -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/instead of the imu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/instead of the imu.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/MPU 6050/kgiul.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/MPU 6050/kgiul.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/Nouveau document texte.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/Nouveau document texte.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/matériel.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/matériel.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/motor driver/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://bayesianadventures.wordpress.com/2013/10/20/arduino-with-l293n-motor-driver/ 2 | http://tronixstuff.com/2014/11/25/tutorial-l298n-dual-motor-controller-modules-and-arduino/ -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/motors/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://bayesianadventures.wordpress.com/2013/10/26/dc-motor-control-class-for-arduino/ 2 | -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/motors/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/motors/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/motors/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/motors/Screenshot_2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/motors/sf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/motors/sf.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/servomoteur/Introduction to Servo Motors _ Arduino.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/servomoteur/Introduction to Servo Motors _ Arduino.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://jeromeabel.net/ressources/xbee-arduino 2 | 3 | http://lookmanowire.blogspot.com/2011_06_01_archive.html 4 | 5 | http://www.instructables.com/id/Arduino-RC-Car-with-FPV-Camera/ un bon projet avec l' xbee 6 | 7 | https://www.youtube.com/watch?v=mPx3TjzvE9U tuturial 8 | 9 | https://learn.adafruit.com/xbee-radios/ 10 | 11 | http://www.exploringarduino.com/content/ch11/ the best 12 | 13 | http://tronixstuff.com/2010/08/06/moving-forward-with-arduino-chapter-14-xbee-introduction/ 14 | 15 | http://www.digi.com/support/productdetail?pid=4549 importantttttttttttttttttttttttttttt 2 16 | 17 | https://alselectro.wordpress.com/2014/09/07/xbee-s2digital-sampling-with-api-frame-data/ -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Nouveau dossier/CoordinatorAPIOnRobotCh0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | XB24-ZB_21A7.xml 6 | 7 | 0 8 | FFFF 9 | 3 10 | 0 11 | FF 12 | 0 13 | FFFF 14 | 0x20 15 | 30 16 | 0 17 | FF 18 | 30000 19 | 3C 20 | 0 21 | 3 22 | 4 23 | 1 24 | 0 25 | 0 26 | 27 | 28 | 3 29 | 0 30 | 0 31 | 1 32 | 0 33 | 1 34 | 0 35 | 20 36 | 1 37 | 1 38 | 0 39 | 0 40 | 0 41 | 0 42 | 1 43 | 1 44 | 0 45 | 0 46 | 1FFF 47 | 0 48 | 28 49 | 1 50 | 0 51 | 0 52 | 0 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Nouveau dossier/FullController2015RouterAKAControllerCh0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | XB24-ZB_22A7.xml 6 | 7 | 0 8 | FFFF 9 | 3 10 | 0 11 | FF 12 | 0 13 | 1 14 | 0 15 | 0 16 | 0 17 | 0x20 18 | 1E 19 | 0 20 | FF 21 | 30000 22 | 3C 23 | 3 24 | 3 25 | E8 26 | E8 27 | 11 28 | 4 29 | 1 30 | 0 31 | 0 32 | 33 | 3 34 | 0 35 | 0 36 | 3 37 | 1 38 | 0 39 | 64 40 | 3E8 41 | 2B 42 | 0 43 | 1 44 | 0 45 | 20 46 | 1388 47 | 0 48 | 2 49 | 2 50 | 2 51 | 3 52 | 3 53 | 3 54 | 0 55 | 0 56 | 0 57 | 1FFF 58 | 0 59 | 28 60 | 1 61 | 32 62 | 0 63 | 0 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Nouveau dossier/FullControllerWorking/FullControllerWorking.ino: -------------------------------------------------------------------------------- 1 | 2 | int digitaldataMSB; 3 | int digitaldataLSB; 4 | int joystickrightMSB; 5 | int joystickrightLSB; 6 | int joystickleftMSB; 7 | int joystickleftLSB; 8 | int throwingpotMSB; 9 | int throwingpotLSB; 10 | byte bitread[28]; 11 | 12 | int qbswivelright = 2; 13 | int qbthrowingspeed = 3; 14 | int qbthrowingspeedvalue; 15 | int qbswivelleft = 4; 16 | int rightwheel = 9; 17 | int rightwheelspeed; 18 | int rightwheelspeedvalue; 19 | int leftwheel = 10; 20 | int leftwheelspeed; 21 | int leftwheelspeedvalue; 22 | int qbthrow = 11; 23 | 24 | int inputPin = A0; 25 | int scaleValue = 0; 26 | int PWMvaluetoMotorDriver = 0; 27 | 28 | float analogReading = 0; 29 | 30 | 31 | void setup(){ 32 | Serial.begin(9600); 33 | //for more info go here: http://forum.arduino.cc/index.php/topic,16612.0.html 34 | //but i basically just took the default PWM frequency and tweeked it to get better resolution, the default is ~1kHz 35 | TCCR1B = TCCR1B & 0b11111000 | 0x03;//set the PWM frequency of pins 9 and 10 to 488Hz 36 | TCCR2B = TCCR2B & 0b11111000 | 0x04;//set the PWM frequency of pins 11 and 3 to 488Hz 37 | } 38 | 39 | void loop(){ 40 | if(Serial.available()>27){ 41 | for (int i = 0; i<28; i++){ 42 | bitread[i] = Serial.read(); 43 | //Serial.print(i); 44 | //Serial.print(": "); 45 | //Serial.print(bitread[i]); 46 | //Serial.print(","); 47 | } 48 | //Serial.println(); 49 | } 50 | /* 51 | bit assignments 52 | 53 | bitread 19- MSB Digital data 54 | bitread 20- LSB Digital data 55 | bitread 21- MSB Throwing Potentiometer 56 | bitread 22- LSB Throwing Potentiometer 57 | bitread 23- MSB Left Joystick 58 | bitread 24- LSB Left Joystick 59 | bitread 25- MSB Right Joystick 60 | bitread 26- LSB Right Joystick 61 | */ 62 | digitaldataMSB = bitread[19]; 63 | digitaldataLSB = bitread[20]; 64 | throwingpotMSB = bitread[21]; 65 | throwingpotLSB = bitread[22]; 66 | joystickleftMSB = bitread[23]; 67 | joystickleftLSB = bitread[24]; 68 | joystickrightMSB = bitread[25]; 69 | joystickrightLSB = bitread[26]; 70 | /* 71 | Serial.print("digitaldataMSB: "); 72 | Serial.println(digitaldataMSB); 73 | Serial.print("digitaldataLSB: "); 74 | Serial.println(digitaldataLSB); 75 | Serial.print("throwingPotMSB: "); 76 | Serial.println(throwingPotMSB); 77 | Serial.print("throwingPotLSB: "); 78 | Serial.println(throwingPotLSB); 79 | Serial.print("joystickLeftMSB: "); 80 | Serial.println(joystickLeftMSB); 81 | Serial.print("joystickLeftLSB: "); 82 | Serial.println(joystickLeftLSB); 83 | Serial.print("joystickRightMSB: "); 84 | Serial.println(joystickRightMSB); 85 | Serial.print("joystickRightLSB: "); 86 | Serial.println(joystickRightLSB); 87 | */ 88 | 89 | 90 | 91 | //Digital data for qb swivel and fire 92 | if (digitaldataMSB == 0){//fire pb pressed 93 | digitalWrite(qbswivelleft,HIGH); 94 | } 95 | if (digitaldataMSB == 4){//fire pb released 96 | digitalWrite(qbswivelleft,LOW); 97 | } 98 | 99 | switch (digitaldataLSB){ 100 | case 8: //just qbswivelright pressed 101 | digitalWrite(qbswivelright,HIGH); 102 | break; 103 | case 32: //just qbthrow pressed 104 | digitalWrite(qbthrow, HIGH); 105 | break; 106 | case 40://both qbswivelright and qbthrow pressed 107 | digitalWrite(qbswivelright,HIGH); 108 | digitalWrite(qbthrow, HIGH); 109 | break; 110 | default://neither qbswivelright or qbthrow pressed 111 | digitalWrite(qbswivelright,LOW); 112 | digitalWrite(qbthrow, LOW); 113 | } 114 | 115 | //motor and throwing speed signals 116 | qbthrowingspeedvalue = throwingpotLSB +(throwingpotMSB*256); 117 | //Serial.println(qbthrowingspeedvalue); 118 | qbthrowingspeed = map(qbthrowingspeedvalue,0,1023,141.25,232.5);//scale value from 0-1023 to 141.25-232.5 119 | analogWrite(qbthrow,qbthrowingspeed); 120 | 121 | leftwheelspeedvalue = joystickleftLSB +(joystickleftMSB*256); 122 | //Serial.println(leftwheelspeedvalue); 123 | leftwheelspeed = map(leftwheelspeedvalue,0,1023,141.25,232.5);//scale value from 0-1023 to 141.25-232.5 124 | analogWrite(leftwheel,leftwheelspeed); 125 | 126 | rightwheelspeedvalue = joystickrightLSB +(joystickrightMSB*256); 127 | //Serial.println(rightwheelspeedvalue); 128 | rightwheelspeed = map(rightwheelspeedvalue,0,1023,141.25,232.5);//scale value from 0-1023 to 141.25-232.5 129 | analogWrite(rightwheel,rightwheelspeed); 130 | 131 | 132 | } 133 | -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Nouveau dossier/Schematic Design of Robots.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/xbee/Nouveau dossier/Schematic Design of Robots.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/matériels/xbee/Remote_Control_with_Xbee_and_Arduino.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/matériels/xbee/Remote_Control_with_Xbee_and_Arduino.zip -------------------------------------------------------------------------------- /everything _about_SBRobots/must.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/must.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.element14.com/community/docs/DOC-76210/l/trying-to-use-a-camera-module-to-show-footage-to-a-lcd-tft-screen 2 | 3 | 4 | https://www.google.com/imgres?imgurl=http://fritzing.org/media/fritzing-repo/projects/o/ov7670-no-ram-arduino-uno/images/ov7670%252520connections.jpg&imgrefurl=http://fritzing.org/projects/ov7670-no-ram-arduino-uno&h=1389&w=2262&tbnid=uqRPq_MvRXBCUM:&docid=2fTRu7NOrAEWAM&ei=uZL7VsLzD8GwasrTqJAP&tbm=isch&ved=0ahUKEwiCtM2cg-jLAhVBmBoKHcopCvIQMwgfKAMwAw 5 | 6 | http://forum.arduino.cc/index.php/topic,159557.0.html 7 | 8 | www.instructables.com/id/OV7670-Without-FIFO-Very-Simple-Framecapture-With-/ 9 | 10 | http://www.arducam.com/camera-modules/0-3mp-ov7670/ 11 | 12 | http://embeddedprogrammer.blogspot.com.br/2012/07/hacking-ov7670-camera-module-sccb-cheat.html 13 | 14 | -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/OV7670 SCH.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/0v7670/OV7670 SCH.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/OV7670 software application note.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/0v7670/OV7670 software application note.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/OV7670.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/0v7670/OV7670.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/OV7670_DS_(1_4).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/0v7670/OV7670_DS_(1_4).pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/0v7670/oc_sccb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/0v7670/oc_sccb.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://www.yt.fully.pk/watch/X6rPdRZzgjg OpenCV Tutorial: Real-Time Object Tracking Without Colour 2 | 3 | http://www.yt.fully.pk/watch/6j-Wy9j0TCs Raspberry Pi 2 and OpenCV 3 Tutorial Part 1 4 | 5 | http://www.instructables.com/id/Face-detection-and-tracking-with-Arduino-and-OpenC/ 6 | 7 | http://www.neuroproductions.be/ des bon projet 8 | 9 | http://letsmakerobots.com/node/43837 un bon project avec open cv (avec arduino) 10 | 11 | http://www.instructables.com/id/Arduino-RC-Car-with-FPV-Camera/ un bon project 12 | 13 | 14 | https://www.circuitsathome.com/camera-control/arduino-based-controller-for-canon-eos-cameras imporatnnnnnnnnnnnnnt1 15 | -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/Screenshot_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/Screenshot_3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/open cv/Serial Camera Module Programming Instructions and Tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/open cv/Serial Camera Module Programming Instructions and Tutorial.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/pendule.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/pendule.txt -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/452.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/452.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/4755.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/4755.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/545.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/545.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/785.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/785.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/7852.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/7852.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/785210.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/785210.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Cascade PID implementation theory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Cascade PID implementation theory.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Information flow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Information flow.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=5qJY-ZaKSic -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/ab1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/ab1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/abstra3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/abstra3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/analyse fig1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/analyse fig1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/analyse1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/analyse1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in g1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in g1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/in2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/intro2.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/intro2.1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/intro2.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/intro2.2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/purpuse and goal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Nouveau dossier (3)/purpuse and goal.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Screensho.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Screensho.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/Screenshot_5.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/controle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/controle.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/diagramme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/diagramme.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/gragcet du programme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/gragcet du programme.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/introduction 1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/introduction 1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/introduction 2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/introduction 2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/inverted pendulum process.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/inverted pendulum process.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/job of the PID.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/job of the PID.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/kalman process.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/kalman process.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/l289N.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/l289N.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/lullom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/lullom.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/modéle dynamique.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/modéle dynamique.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/phrases.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/phrases.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/phy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/phy.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/servomoteur.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/servomoteur.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/upright mass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/upright mass.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/why kalman 2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/why kalman 2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/Nouveau dossier/why kalman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/Nouveau dossier/why kalman.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport pdf/02-eSTA-V21.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport pdf/02-eSTA-V21.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport pdf/ICA20110200012_71434152.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport pdf/ICA20110200012_71434152.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport pdf/most best reports/Final Report PDF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport pdf/most best reports/Final Report PDF.pdf -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/Le robot pendulaire a deux roues est un système dynamique instable.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/Le robot pendulaire a deux roues est un système dynamique instable.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/eig a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/eig a.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/généralité sur les robots.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/généralité sur les robots.docx -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/psi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/psi.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/psidot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/psidot.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/représentation d_état en boucle ouvert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/représentation d_état en boucle ouvert.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/1.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/2.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/3.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/4.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/5.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sensors/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sensors/6.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/sortie de la sys en boucle ouvert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/sortie de la sys en boucle ouvert.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/tf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/tf.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/theta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/theta.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/rapport/rapport11/thetadot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/rapport/rapport11/thetadot.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/remote controle/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://letsmakerobots.com/node/45016 2 | http://www.instructables.com/id/Sphero-Gauntlet/ 3 | http://www.instructables.com/id/Wave-your-hand-to-control-OWI-Robotic-Arm-no-strin/ -------------------------------------------------------------------------------- /everything _about_SBRobots/the end/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/the end/7.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/the end/Nouveau document texte.txt: -------------------------------------------------------------------------------- 1 | http://letsmakerobots.com/node/39982 2 | http://letsmakerobots.com/node/42106 -------------------------------------------------------------------------------- /everything _about_SBRobots/the end/Screenshot_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/the end/Screenshot_6.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/the end/Screenshot_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/the end/Screenshot_7.jpg -------------------------------------------------------------------------------- /everything _about_SBRobots/the end/bbrobot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/everything _about_SBRobots/the end/bbrobot.jpg -------------------------------------------------------------------------------- /my_work/99385/Untitled.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/99385/Untitled.m -------------------------------------------------------------------------------- /my_work/99385/try1.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/99385/try1.slx -------------------------------------------------------------------------------- /my_work/Nouveau dossier (2)/at.m: -------------------------------------------------------------------------------- 1 | A=[0,0,1,0;0,0,0,1;-0,-12,-15,0;0,-3,-2,0] 2 | B=[0;0;-2;-3] 3 | C=[1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1] 4 | D=[0;0;0;0] 5 | r=0.2 6 | Jp=0.8 7 | Jw=0.9 8 | Ra=9 9 | n=3 10 | Kt=12 11 | Ke=10 12 | L=0.3 13 | mw=8 14 | mp=9 15 | g=9.8 16 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier (2)/pidmodel12.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/Nouveau dossier (2)/pidmodel12.slx -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/ProjectData.type.Info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/.SimulinkProject/uuid-12ed38d8-8de1-40ff-830e-6a965df71cf5.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/at.m: -------------------------------------------------------------------------------- 1 | A=[0,0,1,0;0,0,0,1;-0,2,3.5,0;0,-3,-2,0] 2 | B=[0;0;-2;-3] 3 | C=[1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1] 4 | D=[0;0;0;0] 5 | Kkalman=[0.02,-0.05;0.004,-0.003;-0.0004,-0.056] 6 | Jp=0.2 7 | Jw=2.3 8 | g=9.8 9 | L=1.8 10 | Ra=0.9 11 | Kt=5 12 | mp=0.9 13 | Ke=3 14 | r=0.9 15 | mw=0.2 16 | n=0.9 17 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/pidmodel.prj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is a Simulink Project 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /my_work/Nouveau dossier/pidmodel1.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/Nouveau dossier/pidmodel1.slx -------------------------------------------------------------------------------- /my_work/Untitled.m: -------------------------------------------------------------------------------- 1 | ============================================================ 2 | % The code is used to determined the controllability of the system 3 | %Produced by Kealeboga Mokonopi 4 | %University of Southern Queens land 5 | % 2006 6 | %==================================================================== 7 | function controllabilitymatrix 8 | % System Variables 9 | M = 0.5; 10 | m = 0.2; 11 | b = 0.1; 12 | i = 0.006; 13 | g = 9.8; 14 | l = 0.3; 15 | p = i*(M+m)+M*m*l^2; 16 | % Production of system amtrices 17 | A = [0 1 0 0; 18 | 0 -(i+m*l^2)*b/p (m^2*g*l^2)/p 0; 19 | 0 0 0 1; 20 | 0 -(m*l*b)/p m*g*l*(M+m)/p 0]; 21 | B = [0; (i+m*l^2)/p; 0; m*l/p]; 22 | Cm = ctrb(A,B) 23 | Rank = rank(Cm) 24 | ============================================================================================================== 25 | ============================================================================================================ 26 | % The code is used to determined the observability of the system 27 | %Produced by Kealeboga Mokonopi 28 | %University of Southern Queens land 29 | % 2006 30 | %==================================================================== 31 | function observabilitymatrix 32 | %system variables and system amtrices 33 | M = 0.5; 34 | m = 0.2; 35 | b = 0.1; 36 | i = 0.006; 37 | g = 9.8; 38 | l = 0.3; 39 | p = i*(M+m)+M*m*l^2; %denominator 40 | A = [0 1 0 0; 41 | 0 -(i+m*l^2)*b/p (m^2*g*l^2)/p 0; 42 | 0 0 0 1; 43 | 0 -(m*l*b)/p m*g*l*(M+m)/p 0]; 44 | B = [0; (i+m*l^2)/p; 0; m*l/p]; 45 | C = [1 0 0 0;0 0 1 0]; 46 | Om = obsv(A,C) 47 | Rank = rank(Om) 62 48 | ===================================================================== 49 | % The function implements the continous time controller 50 | % using the linear regulator and kalman observer 51 | % Produced by Kealeboga Mokonpi 52 | % USQ, 2006 53 | function lqrcontrl 54 | %==================================================================== 55 | % system variables and constants and system matrices 56 | M = .5; 57 | m = 7; 58 | b = 0.1; 59 | i = 0.523; 60 | g = 9.8; 61 | l = 0.25; 62 | p = i*(M+m)+M*m*l^2; 63 | A = [0 1 0 0; 64 | 0 -(i+m*l^2)*b/p (m^2*g*l^2)/p 0; 65 | 0 0 0 1; 66 | 0 -(m*l*b)/p m*g*l*(M+m)/p 0]; 67 | B = [ 0; 68 | (i+m*l^2)/p; 69 | 0; 70 | m*l/p]; 71 | C = eye(4); 72 | D = [0]; 73 | ssplant = ss(A,B,C,D); 74 | %====================================================================== 75 | set(ssplant, 'InputName', 'Cart Force'); 76 | set(ssplant, 'OutputName', {'Cart Pos', 'Cart Vel', 'Pend Angle', 'Pend 77 | Vel'}); 78 | set(ssplant, 'StateName', {'Cart Pos', 'Cart Vel', 'Pend Angle', 'Pend 79 | Vel'}); 80 | % Design the controller gain 81 | Q = diag([1e9 1e6 1e10 1e5]); 82 | R = 1; 83 | K = lqr(ssplant,Q,R); 84 | %Compute the feedforward gain 85 | Cn=[1 0 0 0]; 86 | N=feedforwardG(A,B,Cn,0,K) 87 | cl_sys = feedback(ssplant, -K,+1) 88 | % t_settle = 3; 89 | % damp_ratio = 0.8; 90 | % % Design the observer gain 91 | a = ssplant.a; b = ssplant.b; 92 | c = [1 0 0 0; 0 0 1 0; 0 0 0 1]; d = [0; 0; 0]; 93 | QN = 0.1^2; 94 | RN = [0.01^2/12 0 0; 0 0.000017^2/12 0;0 0 0.0873^2/12];63 95 | g = b; 96 | h = d; 97 | obs_plant = ss(a, [b g], c, [d h]) 98 | [kest, L] = kalman(obs_plant, QN, RN) 99 | % Create a state space observer-controller 100 | ssobsctrl = ss(a-L*c, [L b-L*d], -K, 0) 101 | % % Augment the plant model to pass the inputs as additional outputs 102 | r = size(b, 2); % Number of inputs 103 | n = size(a, 1); % Number of states 104 | ssplant_aug = ss(a, b, [c; zeros(r, n)], [d; eye(r)]); 105 | % Compute the feedforward gain 106 | Cn=[1 0 0 0]; 107 | N=feedforwardG(A,B,Cn,0,K) 108 | % Form the closed loop system with positive feedback 109 | sscl = N*feedback(ssplant_aug, cl_sys, +1); 110 | figure 111 | plotpole(sscl, t_settle, damp_ratio); 112 | %Plot the step response 113 | set(sscl,'InputName','r (m)', 'OutputName', {'x(m)', 'theta (rad)', 114 | 'angularrate(rad/s)', 'F (N)'}); 115 | figure 116 | step(sscl)64 117 | function plot_poles(sscl, t_settle, damp_ratio) 118 | ======================================================================= 119 | %PLOT_POLES Plot system pole locations with settling time and damping 120 | ratio constraints. 121 | % 122 | % PLOT_POLES(SSCL, T_SETTLE, DAMP_RATIO) 123 | % 124 | % This function plots the pole locations for the closed loop 125 | % system SSCL along with the settling time constraint 126 | % T_SETTLE (in seconds) and damping ratio DAMP_RATIO. 127 | % By Jim Ledin, 2002. 128 | ======================================================================= 129 | plot(pole(sscl), 'o') 130 | axis equal 131 | a = axis; 132 | x_min = a(1); x_max = a(2); 133 | y_min = a(3); y_max = a(4); 134 | settling_pct = 0.01; % If no settling percentage given, use 1% 135 | settling_limit = -log(settling_pct) / t_settle; 136 | if x_max < -settling_limit + 0.1*(x_max - x_min) 137 | x_max = -settling_limit + 0.1*(x_max - x_min); 138 | a(2) = x_max; 139 | end 140 | hold on 141 | plot([x_min x_max], [0 0], '--k') 142 | plot([0 0], [y_min y_max], '--k') 143 | plot([-settling_limit -settling_limit], [y_min y_max]); 144 | angle = acos(damp_ratio); 145 | plot([x_min 0 x_min], [x_min*tan(angle) 0 -x_min*tan(angle)]) 146 | axis(a) 147 | hold off -------------------------------------------------------------------------------- /my_work/Untitled102.m: -------------------------------------------------------------------------------- 1 | A=[0,1,0,0;0,0.2,2,-0.6;0,0,0,1;0,2,5,8] 2 | B=[0;2;5;2] 3 | C=[0,0,1,0:0,0,0,1] 4 | -------------------------------------------------------------------------------- /my_work/lqr.m: -------------------------------------------------------------------------------- 1 | A=[0,1,0,0;0,-126.3,-12.8,5.1;0,0,0,1;0,1446.9,213.6,-57.9] 2 | B=[0;10.7;0;-122.6] 3 | C=[0,0,1,0;0,0,0,1] 4 | -------------------------------------------------------------------------------- /my_work/lqr1.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/lqr1.slx -------------------------------------------------------------------------------- /my_work/pid1.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/pid1.slx -------------------------------------------------------------------------------- /my_work/untitled1.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/my_work/untitled1.slx -------------------------------------------------------------------------------- /sortie moteur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/sortie moteur.jpg -------------------------------------------------------------------------------- /useful links/README.md: -------------------------------------------------------------------------------- 1 | txt 2 | -------------------------------------------------------------------------------- /useful links/Untitled10.m: -------------------------------------------------------------------------------- 1 | a=[0,0,1,0;0,0,0,1;0,-289.47,-3.98,0;0,103.05,-1.97,0]; 2 | b=[0;0;9.057;5.655]; 3 | c=[1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1]; 4 | d=[0;0;0;0]; 5 | Ke=0.44; 6 | Kt=0.47; 7 | jp=2.26e-3; 8 | jw=2.312e-5; 9 | g=9.8; 10 | l=0.04; 11 | Ra=9.5; 12 | n=1/20; 13 | mp=0.57; 14 | mw=0.04; 15 | r=0.034; 16 | -------------------------------------------------------------------------------- /useful links/i can try.txt: -------------------------------------------------------------------------------- 1 | http://www.instructables.com/id/Chappie-Self-Balancing-Robot/ 2 | http://www.instructables.com/id/Self-Balancing-Upside-Down-Pendulum/ 3 | http://elxedelectronics.blogspot.mx/ 4 | http://www.instructables.com/id/Self-Balancing-Robot/ 5 | http://make.robimek.com/arduino-self-balancing-robot/ 6 | https://www.youtube.com/watch?v=oK_kQzm8P8M 7 | http://zhiling-guo.com/project/sbr1/#comment-7 8 | -------------------------------------------------------------------------------- /useful links/important.txt: -------------------------------------------------------------------------------- 1 | 2 | https://www.youtube.com/watch?v=GjjQi64PUTM matlab with mpu6050 3 | http://www.kerrywong.com/2012/03/08/a-self-balancing-robot-i/ 4 | http://sebastiannilsson.com/en/?s=realtime+plotter. 5 | http://wired.chillibasket.com/2015/03/pid-controller/ 6 | http://www.instructables.com/id/How-to-make-a-voice-control-direction-control-remo/ 7 | http://robocv.blogspot.com/2012/01/serial-communication-between-arduino.html 8 | http://robocv.blogspot.com/2013/03/making-two-wheeled-self-balancing-robot.html 9 | https://fr.scribd.com/doc/229489206/Thesis-Self-Balancing-Robot 10 | https://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/f2015/dc686_nn233_hz263/final_project_webpage_v2/dc686_nn233_hz263/ 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /useful links/other.txt: -------------------------------------------------------------------------------- 1 | 2 | http://diyourself.ru/technology/simple-self-balancing-robot-w-galileo-gen-2-do-it.html 3 | http://makerzone.mathworks.com/resources/using-infrared-proximity-sensors-with-simulink-and-arduino-part-1/ 4 | https://sciencetonnante.wordpress.com/2011/10/24/dou-vient-la-stabilite-dun-velo/ 5 | http://www.positron-libre.com/robotique/programmation/commande-entrainement-differentiel.php 6 | http://blog.positron-libre.com/robots/pendule-inverse-vertibot.php 7 | http://www.transistor.io/balancing-robot.html 8 | 9 | 10 | http://www.socialledge.com/sjsu/index.php?title=S15:_Self-Balancing_Robot 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | http://www.instructables.com/id/Arduino-Self-Balancing-Robot/ 22 | http://www.instructables.com/id/Self-Balancing-Robot-with-LCD/ 23 | -------------------------------------------------------------------------------- /useful links/untitled100.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedmerzoug/Self-balancing-robot-with-matlab/36ee955e91b5944b67d8da18a194ef4e0d90032c/useful links/untitled100.slx -------------------------------------------------------------------------------- /useful links/valeur (1).txt: -------------------------------------------------------------------------------- 1 | g=9.8 m/s^2 2 | W=0.18m 3orth 3 | H=0.16m touuul 4 | mp=0.57kg masse de pendule 5 | Jp=7.3*10^-3 moment d'inertie de pendule 6 | mw=40gr masse de la roue 7 | rw=3.4cm rayon de la roue 8 | Jw=6.98*10^-3 moment d'inertie de la roue 9 | m batterie=150gr 10 | 11 | 12 | 13 | www.instructables.com/id/DIY-Lithium-ion-Battery-Charger/ 14 | 15 | 16 | --------------------------------------------------------------------------------