├── 3D_designs ├── README.md ├── base │ ├── main_body_assembled_v1.png │ ├── main_body_bottom_short_v1.png │ ├── main_body_bottom_short_v1.stl │ ├── main_body_bottom_tall _v1.png │ ├── main_body_bottom_tall_v1.stl │ ├── main_body_top_v1.png │ └── main_body_top_v1.stl ├── battery_block │ ├── battery_block_bottom_v1.png │ ├── battery_block_bottom_v1.stl │ ├── battery_block_top_v1.png │ └── battery_block_top_v1.stl ├── breadboard_blocks │ ├── mini_breadboard_block │ │ ├── mini breadboard.jpg │ │ └── mini_breadboard v1.stl │ └── small_breadboard_block │ │ ├── breadboard.jpg │ │ ├── breadboard_module_bottom_v1.stl │ │ └── breadboard_module_top_v1.stl ├── cable_management │ ├── mixed_cables.stl │ ├── normal_cables.stl │ └── thin_cables.stl ├── expansion_parts │ ├── dual_male_head_v1.png │ ├── dual_male_head_v1.stl │ ├── sensor_extender_tall_v1.stl │ ├── sensor_extender_v1.png │ └── sensor_extender_v1.stl ├── free_rotation_parts │ ├── free_rotation_wheel_block │ │ ├── free_rotation_wheel_block_v1.stl │ │ └── shaft_v1.stl │ └── metal_ball_caster_block │ │ ├── metal_ball_caster.jpg │ │ └── metal_ball_caster_v1.stl ├── ir_obstacle_sensor_block │ ├── ir proximity sensor.jpg │ ├── ir_block_assembled_v1.png │ ├── ir_block_assembled_v1.stl │ ├── ir_block_bottom_v1.stl │ └── ir_block_top_v1.stl ├── motor_block │ ├── geared_motor.jpg │ ├── motor_block_assembled_v1.png │ ├── motor_block_assembled_v1.stl │ ├── motor_block_bottom_v1.png │ ├── motor_block_bottom_v1.stl │ ├── motor_block_top_v1.png │ └── motor_block_top_v1.stl ├── motor_driver_base │ ├── L298N_Dual_H-Bridge_clip_module_v1.png │ └── L298N_Dual_H-Bridge_clip_module_v1.stl ├── multiconnector_module │ └── multiconnector_module_v1.stl ├── nokia_5110_screen_block │ ├── nokia-5110-lcd.jpg │ ├── screen_block_bottom_v1.stl │ └── screen_block_top_v1.stl ├── odometers │ ├── optical_odometer module │ │ ├── HC-020K.png │ │ ├── coupler_v1.stl │ │ ├── optical_odometer_body_v1.stl │ │ └── shaft_v1.stl │ └── optical_odometer_block │ │ ├── HC-020K.png │ │ ├── odometer_bottom_v1.stl │ │ ├── odometer_top_v1.stl │ │ └── shaft_v1.stl ├── power_block │ ├── power_case_bottom_v1.stl │ ├── power_case_top_v1.stl │ └── step down circuit.jpg ├── raspberry_pi_base │ ├── raspberry_pi_3_clip_module_v1.png │ └── raspberry_pi_3_clip_module_v1.stl ├── raspberry_pi_camera_block │ ├── camera_block_assembled_v1.png │ ├── camera_block_assembled_v1.stl │ ├── camera_block_bottom_v1.stl │ ├── camera_block_top_v1.stl │ └── raspberry pi camera.jpg ├── robotic_arm │ ├── arm_extension_servo_head_v1.stl │ ├── gripper │ │ ├── claw_left_v1.stl │ │ ├── claw_right_v1.stl │ │ ├── clip_long_v1.stl │ │ ├── clip_short_v1.stl │ │ ├── grip_bottom_v1.stl │ │ ├── grip_full.png │ │ ├── grip_inside.png │ │ ├── grip_top_v1.stl │ │ └── servo_hat_v1.stl │ ├── servo_rotation_base_v1.stl │ └── srvo_spacer_2mm_.stl ├── servo_motor_block │ ├── servo_motor_block_bottom_v1.stl │ ├── servo_motor_block_top_v1.stl │ └── towerpro-sg-5010.jpg ├── socket_system │ ├── socket_clip_v1.stl │ └── socket_male_template_v1.stl ├── templates │ ├── male_socket.f3d │ ├── male_socket.obj │ ├── socket_clip.f3d │ └── socket_clip.obj └── ultrasonic_sensor_block │ ├── HC-SR04.jpg │ ├── HC-SR04_ultrasonic_block_assembled_v1.stl │ ├── HC-SR04_ultrasonic_block_bottom_v1.stl │ ├── HC-SR04_ultrasonic_block_top_v1.stl.stl │ └── HC-SR04_ultrasonic_block_v1.png ├── LICENSE ├── README.md ├── assets └── images │ ├── 4leg.png │ ├── advance.png │ ├── arm.png │ ├── components.png │ ├── mot_module v19.png │ ├── motor assembled.png │ ├── odom,eter v5.png │ ├── prog_stuck.png │ └── simple.png ├── gsoc-timeline.md ├── source ├── README.md ├── ext │ ├── READM.md │ └── haarcascade_frontalface_default.xml ├── notebooks │ ├── Courses │ │ ├── Acceleration and Velocity experiment │ │ │ ├── .ipynb_checkpoints │ │ │ │ └── Acceleration and Velocity experiment-checkpoint.ipynb │ │ │ ├── Acceleration and Velocity experiment.ipynb │ │ │ └── images │ │ │ │ ├── 220px-Gravity_gravita_grave.gif │ │ │ │ ├── avaccel.svg │ │ │ │ ├── dt.svg │ │ │ │ ├── dv.svg │ │ │ │ ├── nascar.jpg │ │ │ │ └── vel.svg │ │ ├── Basic robot movement │ │ │ ├── .ipynb_checkpoints │ │ │ │ └── Basic robot movement-checkpoint.ipynb │ │ │ ├── Basic robot movement.ipynb │ │ │ └── images │ │ │ │ └── 2_wheel_metal.png │ │ ├── Distance calculation based on circle theory │ │ │ ├── .ipynb_checkpoints │ │ │ │ └── Distance calculation based on circle theory-checkpoint.ipynb │ │ │ ├── Distance calculation based on circle theory.ipynb │ │ │ └── images │ │ │ │ ├── 320px-2pi-unrolled.gif │ │ │ │ ├── circle.png │ │ │ │ ├── circum.svg │ │ │ │ ├── cpd.svg │ │ │ │ └── pcd.svg │ │ ├── Force and levers │ │ │ ├── .ipynb_checkpoints │ │ │ │ └── Force and levers-checkpoint.ipynb │ │ │ ├── Force and levers.ipynb │ │ │ └── images │ │ │ │ ├── 220px-Lever_Principle_3D.png │ │ │ │ ├── 220px-Palanca-ejemplo.jpg │ │ │ │ ├── f1.svg │ │ │ │ ├── f1f2.svg │ │ │ │ ├── f2.svg │ │ │ │ ├── ma.svg │ │ │ │ └── t1t2.svg │ │ └── Human brain reaction time │ │ │ ├── .ipynb_checkpoints │ │ │ └── Human brain reaction time-checkpoint.ipynb │ │ │ ├── Human brain reaction time.ipynb │ │ │ └── images │ │ │ └── reaction1.png │ └── Examples │ │ ├── .ipynb_checkpoints │ │ ├── Blink a led example-checkpoint.ipynb │ │ ├── Button check-checkpoint.ipynb │ │ ├── Camera check-checkpoint.ipynb │ │ ├── Camera frames processing -checkpoint.ipynb │ │ ├── Collision avoidance robot-checkpoint.ipynb │ │ ├── Data logger example-checkpoint.ipynb │ │ ├── Ir obstacle sensor check-checkpoint.ipynb │ │ ├── Line follower robot-checkpoint.ipynb │ │ ├── MPU-6050 accelerometer check-checkpoint.ipynb │ │ ├── Motor check -checkpoint.ipynb │ │ ├── Odometer check-checkpoint.ipynb │ │ ├── Servo motor control-checkpoint.ipynb │ │ └── Ultrasonic obstacle sensor check-checkpoint.ipynb │ │ ├── Blink a led example.ipynb │ │ ├── Button check.ipynb │ │ ├── Camera check.ipynb │ │ ├── Camera frames processing .ipynb │ │ ├── Collision avoidance robot.ipynb │ │ ├── Data logger example.ipynb │ │ ├── Ir obstacle sensor check.ipynb │ │ ├── Line follower robot.ipynb │ │ ├── MPU-6050 accelerometer check.ipynb │ │ ├── Motor check .ipynb │ │ ├── Odometer check.ipynb │ │ ├── Servo motor control.ipynb │ │ └── Ultrasonic obstacle sensor check.ipynb ├── robot_library │ ├── LICENSE │ ├── MANIFEST.in │ ├── README.md │ ├── proteas_lib │ │ ├── __init__.py │ │ ├── control.py │ │ └── vision.py │ └── setup.py └── webserver_robot_manager │ ├── index.js │ └── public │ ├── images │ ├── bgr.png │ ├── blue-cog-md.png │ ├── gsoc-gfoss.png │ ├── jupyter.png │ ├── proteas_main.png │ ├── restart.png │ ├── shutdown.png │ ├── user-manual.png │ └── user.png │ ├── index.html │ ├── instructions.pdf │ └── w3.css └── third_party_licenses ├── OpenCV_Contrib_LICENSE └── OpenCV_LICENSE /3D_designs/README.md: -------------------------------------------------------------------------------- 1 | # The designs of the DIY-Robot kit 2 | 3 | Here you can find all the stl files for the kit. For instructions and images visit the [Wiki](https://github.com/eellak/gsoc2019-diyrobot/wiki) of the repository . 4 | 5 | ![components](../assets/images/components.png) 6 | 7 | * Socket System templates 8 | * Connection System between components blocks :white_check_mark: 9 | * Lock System between for components blocks :white_check_mark: 10 | * Raspberry Pi 3 self lock base :white_check_mark: 11 | * L298N Dual H-Bridge self lock base :white_check_mark: 12 | * Motor Block 13 | * Top part :white_check_mark: 14 | * Bottom part :white_check_mark: 15 | * Free rotation modules 16 | * Metal Ball Caster :white_check_mark: 17 | * Free rotation wheel module :white_check_mark: 18 | * Main body 19 | * Top part :white_check_mark: 20 | * Bottom part tall :white_check_mark: 21 | * Bottom part short:white_check_mark: 22 | * Boards modules 23 | * Raspberry Pi 3 self lock base with male socket :white_check_mark: 24 | * L298N Dual H-Bridge self lock base with male socket :white_check_mark: 25 | * Power block 26 | * Battery block 27 | * Wire grouping socket 28 | 29 | * 8 Pin expansion suitable for GND and VCC :white_check_mark: 30 | * 10 cables management component (thin cables) :white_check_mark: 31 | * 10 cables management component (normal cables) :white_check_mark: 32 | * 10 cables management component (mixed cables) :white_check_mark: 33 | * Servo Blocks 34 | 35 | * SG-5010 Servo :white_check_mark: 36 | * Arm parts 37 | * Rotation base :white_check_mark: 38 | * Arm extension servo head socket :white_check_mark: 39 | * Robotic Arm Gripper :white_check_mark: 40 | * Sensors Blocks 41 | * Raspberry Pi Camera Block :white_check_mark: 42 | 43 | * Ultrasonic sensor HC-SR04 :white_check_mark: 44 | 45 | * IR Infrared Obstacle :white_check_mark: 46 | 47 | * Sensor extender 2 socket L shape:white_check_mark: 48 | 49 | * Sensor extender 4 socket L shape:white_check_mark: 50 | 51 | * Dual male connector for Sensor extenders :white_check_mark: 52 | 53 | * Breadboard module :white_check_mark: 54 | 55 | * Magic Super-Mini-Breadboard :white_check_mark: 56 | 57 | * Nokia 5110 LCD screen module :white_check_mark: 58 | 59 | * Optical odometer HC-020K block:white_check_mark: 60 | 61 | * Internal Optical odometer HC-020K block:white_check_mark: 62 | 63 | 64 | 65 | 66 | ## Explanation of the marks 67 | * :warning: Under Construction part, not ready for printing yet. 68 | * :white_check_mark: Ready for printing. 69 | * :construction: Upcoming release 70 | 71 | 72 | 73 | 74 | Άδεια Creative Commons
The 3D designs , educational material and text is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License -------------------------------------------------------------------------------- /3D_designs/base/main_body_assembled_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_assembled_v1.png -------------------------------------------------------------------------------- /3D_designs/base/main_body_bottom_short_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_bottom_short_v1.png -------------------------------------------------------------------------------- /3D_designs/base/main_body_bottom_short_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_bottom_short_v1.stl -------------------------------------------------------------------------------- /3D_designs/base/main_body_bottom_tall _v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_bottom_tall _v1.png -------------------------------------------------------------------------------- /3D_designs/base/main_body_bottom_tall_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_bottom_tall_v1.stl -------------------------------------------------------------------------------- /3D_designs/base/main_body_top_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_top_v1.png -------------------------------------------------------------------------------- /3D_designs/base/main_body_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/base/main_body_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/battery_block/battery_block_bottom_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/battery_block/battery_block_bottom_v1.png -------------------------------------------------------------------------------- /3D_designs/battery_block/battery_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/battery_block/battery_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/battery_block/battery_block_top_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/battery_block/battery_block_top_v1.png -------------------------------------------------------------------------------- /3D_designs/battery_block/battery_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/battery_block/battery_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/breadboard_blocks/mini_breadboard_block/mini breadboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/breadboard_blocks/mini_breadboard_block/mini breadboard.jpg -------------------------------------------------------------------------------- /3D_designs/breadboard_blocks/mini_breadboard_block/mini_breadboard v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/breadboard_blocks/mini_breadboard_block/mini_breadboard v1.stl -------------------------------------------------------------------------------- /3D_designs/breadboard_blocks/small_breadboard_block/breadboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/breadboard_blocks/small_breadboard_block/breadboard.jpg -------------------------------------------------------------------------------- /3D_designs/breadboard_blocks/small_breadboard_block/breadboard_module_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/breadboard_blocks/small_breadboard_block/breadboard_module_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/breadboard_blocks/small_breadboard_block/breadboard_module_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/breadboard_blocks/small_breadboard_block/breadboard_module_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/cable_management/mixed_cables.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/cable_management/mixed_cables.stl -------------------------------------------------------------------------------- /3D_designs/cable_management/normal_cables.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/cable_management/normal_cables.stl -------------------------------------------------------------------------------- /3D_designs/cable_management/thin_cables.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/cable_management/thin_cables.stl -------------------------------------------------------------------------------- /3D_designs/expansion_parts/dual_male_head_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/expansion_parts/dual_male_head_v1.png -------------------------------------------------------------------------------- /3D_designs/expansion_parts/dual_male_head_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/expansion_parts/dual_male_head_v1.stl -------------------------------------------------------------------------------- /3D_designs/expansion_parts/sensor_extender_tall_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/expansion_parts/sensor_extender_tall_v1.stl -------------------------------------------------------------------------------- /3D_designs/expansion_parts/sensor_extender_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/expansion_parts/sensor_extender_v1.png -------------------------------------------------------------------------------- /3D_designs/expansion_parts/sensor_extender_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/expansion_parts/sensor_extender_v1.stl -------------------------------------------------------------------------------- /3D_designs/free_rotation_parts/free_rotation_wheel_block/free_rotation_wheel_block_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/free_rotation_parts/free_rotation_wheel_block/free_rotation_wheel_block_v1.stl -------------------------------------------------------------------------------- /3D_designs/free_rotation_parts/free_rotation_wheel_block/shaft_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/free_rotation_parts/free_rotation_wheel_block/shaft_v1.stl -------------------------------------------------------------------------------- /3D_designs/free_rotation_parts/metal_ball_caster_block/metal_ball_caster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/free_rotation_parts/metal_ball_caster_block/metal_ball_caster.jpg -------------------------------------------------------------------------------- /3D_designs/free_rotation_parts/metal_ball_caster_block/metal_ball_caster_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/free_rotation_parts/metal_ball_caster_block/metal_ball_caster_v1.stl -------------------------------------------------------------------------------- /3D_designs/ir_obstacle_sensor_block/ir proximity sensor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ir_obstacle_sensor_block/ir proximity sensor.jpg -------------------------------------------------------------------------------- /3D_designs/ir_obstacle_sensor_block/ir_block_assembled_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ir_obstacle_sensor_block/ir_block_assembled_v1.png -------------------------------------------------------------------------------- /3D_designs/ir_obstacle_sensor_block/ir_block_assembled_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ir_obstacle_sensor_block/ir_block_assembled_v1.stl -------------------------------------------------------------------------------- /3D_designs/ir_obstacle_sensor_block/ir_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ir_obstacle_sensor_block/ir_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/ir_obstacle_sensor_block/ir_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ir_obstacle_sensor_block/ir_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/motor_block/geared_motor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/geared_motor.jpg -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_assembled_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_assembled_v1.png -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_assembled_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_assembled_v1.stl -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_bottom_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_bottom_v1.png -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_top_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_top_v1.png -------------------------------------------------------------------------------- /3D_designs/motor_block/motor_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_block/motor_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/motor_driver_base/L298N_Dual_H-Bridge_clip_module_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_driver_base/L298N_Dual_H-Bridge_clip_module_v1.png -------------------------------------------------------------------------------- /3D_designs/motor_driver_base/L298N_Dual_H-Bridge_clip_module_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/motor_driver_base/L298N_Dual_H-Bridge_clip_module_v1.stl -------------------------------------------------------------------------------- /3D_designs/multiconnector_module/multiconnector_module_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/multiconnector_module/multiconnector_module_v1.stl -------------------------------------------------------------------------------- /3D_designs/nokia_5110_screen_block/nokia-5110-lcd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/nokia_5110_screen_block/nokia-5110-lcd.jpg -------------------------------------------------------------------------------- /3D_designs/nokia_5110_screen_block/screen_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/nokia_5110_screen_block/screen_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/nokia_5110_screen_block/screen_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/nokia_5110_screen_block/screen_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer module/HC-020K.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer module/HC-020K.png -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer module/coupler_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer module/coupler_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer module/optical_odometer_body_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer module/optical_odometer_body_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer module/shaft_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer module/shaft_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer_block/HC-020K.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer_block/HC-020K.png -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer_block/odometer_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer_block/odometer_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer_block/odometer_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer_block/odometer_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/odometers/optical_odometer_block/shaft_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/odometers/optical_odometer_block/shaft_v1.stl -------------------------------------------------------------------------------- /3D_designs/power_block/power_case_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/power_block/power_case_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/power_block/power_case_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/power_block/power_case_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/power_block/step down circuit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/power_block/step down circuit.jpg -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_base/raspberry_pi_3_clip_module_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_base/raspberry_pi_3_clip_module_v1.png -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_base/raspberry_pi_3_clip_module_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_base/raspberry_pi_3_clip_module_v1.stl -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_camera_block/camera_block_assembled_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_camera_block/camera_block_assembled_v1.png -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_camera_block/camera_block_assembled_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_camera_block/camera_block_assembled_v1.stl -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_camera_block/camera_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_camera_block/camera_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_camera_block/camera_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_camera_block/camera_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/raspberry_pi_camera_block/raspberry pi camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/raspberry_pi_camera_block/raspberry pi camera.jpg -------------------------------------------------------------------------------- /3D_designs/robotic_arm/arm_extension_servo_head_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/arm_extension_servo_head_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/claw_left_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/claw_left_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/claw_right_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/claw_right_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/clip_long_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/clip_long_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/clip_short_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/clip_short_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/grip_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/grip_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/grip_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/grip_full.png -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/grip_inside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/grip_inside.png -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/grip_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/grip_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/gripper/servo_hat_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/gripper/servo_hat_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/servo_rotation_base_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/servo_rotation_base_v1.stl -------------------------------------------------------------------------------- /3D_designs/robotic_arm/srvo_spacer_2mm_.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/robotic_arm/srvo_spacer_2mm_.stl -------------------------------------------------------------------------------- /3D_designs/servo_motor_block/servo_motor_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/servo_motor_block/servo_motor_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/servo_motor_block/servo_motor_block_top_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/servo_motor_block/servo_motor_block_top_v1.stl -------------------------------------------------------------------------------- /3D_designs/servo_motor_block/towerpro-sg-5010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/servo_motor_block/towerpro-sg-5010.jpg -------------------------------------------------------------------------------- /3D_designs/socket_system/socket_clip_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/socket_system/socket_clip_v1.stl -------------------------------------------------------------------------------- /3D_designs/socket_system/socket_male_template_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/socket_system/socket_male_template_v1.stl -------------------------------------------------------------------------------- /3D_designs/templates/male_socket.f3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/templates/male_socket.f3d -------------------------------------------------------------------------------- /3D_designs/templates/socket_clip.f3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/templates/socket_clip.f3d -------------------------------------------------------------------------------- /3D_designs/ultrasonic_sensor_block/HC-SR04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ultrasonic_sensor_block/HC-SR04.jpg -------------------------------------------------------------------------------- /3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_assembled_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_assembled_v1.stl -------------------------------------------------------------------------------- /3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_bottom_v1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_bottom_v1.stl -------------------------------------------------------------------------------- /3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_top_v1.stl.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_top_v1.stl.stl -------------------------------------------------------------------------------- /3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/3D_designs/ultrasonic_sensor_block/HC-SR04_ultrasonic_block_v1.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Christos Chronis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :rocket: GSOC 2019 - A DIY robot kit for educators 2 | =============== 3 | 4 | ## Introduction 5 | With this project I designed an easy to assembly and program, robot from scratch. The designs are 3D printable and all the electronics parts are easy to find in any electronic equipment store. The robot has the Raspberry Pi 3+ as the main computer with Raspbian operating system combined with Jupyter Notebook as programing interface and a Node.js application as front-end main control page. You can program and control the robot through your browser using the Proteas wireless access point. 6 | 7 | [View the project on Google Summer of Code website](https://summerofcode.withgoogle.com/projects/#6536613096587264). 8 | 9 | You can see the detailed timeline [here](https://github.com/eellak/gsoc2019-diyrobot/blob/master/gsoc-timeline.md). 10 | 11 | 12 | 13 | ![proteas robot advance](./assets/images/advance.png) 14 | 15 | ### Proteas robot teaser video 16 | 17 | [![](http://img.youtube.com/vi/83zVe_P6pcM/0.jpg)](http://www.youtube.com/watch?v=83zVe_P6pcM "") 18 | 19 | Final Report 20 | ------------ 21 | 22 | You can visit this [gist](https://gist.github.com/chronis10/9d069c56b3df9c92693ac8d24270a62a) that summarizes in a few words, the work which was done during the Google Summer of Code working period. 23 | 24 | Synopsis 25 | -------- 26 | 27 | With this project you can construct a modular robot, easy to use with cheap electronic parts and 3D printed parts. The procedure to construct the robot is explained detailed on the [Wiki](https://github.com/eellak/gsoc2019-diyrobot/wiki) of the project. The main procedure is: 28 | 29 | 1. Read the wiki and choose the type of robot you want 30 | 2. Gather all the needed electronic parts 31 | 3. Print the parts 32 | 4. Preassembly the blocks 33 | 5. Burn the custom Raspbian image and load it to the Raspberry PI 34 | 6. Assembly the robot 35 | 7. Power on the robot 36 | 8. Connect to proteas network and have fun. 37 | 38 | Challenges -> Problems -> Solutions 39 | -------- 40 | 41 | The main challenge of the project was the requirement to avoided the usage of tools on the assembly stage. The first days of the project I designed and tested about ten different designs of the socket system. Another problem was the voltages of the electronic parts, most of the parts are designed to work with the Arduino 5V voltages but the Raspberry Pi voltages are 3V and for that reason used a Bidirectional Logic Level Converter. Also the investigation of a stable and capable power source was crucial because nobody wants a robot with short working time, finally selected a custom build power block (BMS, Li-ion batteries and stepdown circuit) which offers excellent performance, recharging capability, usage of the robot with external power supply and long working time. Finally because the robot needed to be easy to programme form people with low experience with programming, decided to use a object oriented way. The code for the electronic parts in some cases it was complicated for a new user and using the object oriented way the code transformed from 50 lines to 3 lines easy to understand and use code. 42 | 43 | 44 | 45 | 46 | GSoC Deliverables 47 | ------------ 48 | 49 | 1. 3D printed parts ready to print 50 | 2. Python library for easy usage and control of the robot 51 | 3. Integration with Jupyter 52 | 4. Easy way to access the robot 53 | 5. Custom Raspbian image with OpenCV, Jupyter, Node.js, Python libraries, instructions and configuration intergraded. 54 | 6. Extensive instruction for the assembly and usage 55 | 7. Jupyter Notebooks with examples and educational material 56 | 57 | Future Work 58 | ------------ 59 | 60 | There is still a lot work that may be done, in order the Proteas robot to be a direct competitive to any commercial alternative on education robotics and I believe, with the support of the Open Source community, that goal can be reached. Feel free, to contribute and participate on that project, any suggestion and improvement are welcomed. 61 | 62 | Some thoughts for future work: 63 | 64 | 1. Support of analogue sensors 65 | 2. More 3D printed components 66 | 3. More electronic sensors support 67 | 4. Improvements on designs 68 | 5. Integration with Scratch, Node-RED 69 | 6. Compatibility with Arduino 70 | 7. Better wireless connection 71 | 8. Companion app for Android/IOS 72 | 9. Custom build PCB for easy connection of the electronic components 73 | 74 | 75 | 76 | ### Student 77 | 78 | * [Christos Chronis](https://github.com/chronis10) 79 | 80 | ### GSoC Mentors 81 | 82 | * Iraklis Varlamis 83 | * Theodoros Karounos 84 | * Konstantinos Kalovrektis 85 | 86 | ### Organization : Open Technologies Alliance - GFOSS 87 | 88 | 89 | Άδεια Creative Commons
The 3D designs , educational material and text is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License 90 | -------------------------------------------------------------------------------- /assets/images/4leg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/4leg.png -------------------------------------------------------------------------------- /assets/images/advance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/advance.png -------------------------------------------------------------------------------- /assets/images/arm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/arm.png -------------------------------------------------------------------------------- /assets/images/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/components.png -------------------------------------------------------------------------------- /assets/images/mot_module v19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/mot_module v19.png -------------------------------------------------------------------------------- /assets/images/motor assembled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/motor assembled.png -------------------------------------------------------------------------------- /assets/images/odom,eter v5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/odom,eter v5.png -------------------------------------------------------------------------------- /assets/images/prog_stuck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/prog_stuck.png -------------------------------------------------------------------------------- /assets/images/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/assets/images/simple.png -------------------------------------------------------------------------------- /gsoc-timeline.md: -------------------------------------------------------------------------------- 1 | ## :calendar: Timeline 2 | 3 | 4 | The implementation details follow, organized by [GSoC timeline](https://developers.google.com/open-source/gsoc/timeline). 5 | 6 | ## Phase 1 (May 27 - Jun 28) 7 | 8 | 9 | The proper electronic parts selected for that project and designed,printed and tested the 3D parts of the robot in a modular way with a tool-less philosophy. 10 | 11 | - Selection of electronic parts 12 | - 3D designs :triangular_ruler: 13 | - Parts printing stage 14 | - Functionality tests of the parts 15 | - Robot Assembly :wrench: 16 | 17 | ## Phase 2 (Jun 29 - Jul 26) 18 | 19 | 20 | New libraries created for the communication between hardware-software. A object oriented way for programming selected and the integration with Jupyter completed. 21 | 22 | - Control library 23 | - Vision library 24 | - OpenCV integration 25 | - Special control and functionality library (e.x. PID Controller) 26 | - Jupyter Notebook integration 27 | - Wireless access, control and programming of the program achieved 28 | 29 | ## Phase 3 (Jul 27 - Aug 26) 30 | 31 | 32 | All the needed preparations completed for easy deployment of software and material for the courses, user manuals and instructions created. 33 | 34 | - Modifications of Rasbian image 35 | - Courses on Jupyter Notebook (e.x. Line Follower robot) 36 | - PDFs with extensive instructions for the assembly and usage of the robot 37 | - Final debugging 38 | - Wiki page created -------------------------------------------------------------------------------- /source/README.md: -------------------------------------------------------------------------------- 1 | # The mind of the Robot 2 | 3 | Here you can find all the needed files (python libraries and scripts) for a smooth deployment. 4 | 5 | For instructions visit the [Wiki](https://github.com/eellak/gsoc2019-diyrobot/wiki) of the repository 6 | 7 | An overview of my programming stuck. 8 | ![prog stuck](../assets/images/prog_stuck.png) 9 | 10 | 11 | * Python robot library :white_check_mark:: 12 | * Buzzer class :white_check_mark: 13 | * Dc motor class :white_check_mark: 14 | * Optical odometer class :white_check_mark: 15 | * Obstacle IR sensor class :white_check_mark: 16 | * Servo motor class :white_check_mark: 17 | * Nokia 5110 screen :white_check_mark: 18 | * MPU6050 accelerometer :white_check_mark: 19 | * Ultrasonic sensor :white_check_mark: 20 | * General input class (every sensor with digital output eg. light sensor) :white_check_mark: 21 | * General output class (led and every sensor with digital input eg. relay shield) :white_check_mark: 22 | * Button class with software Pull Down parameter enabled :white_check_mark: 23 | * Timer class for usage on PID,logs or every usage with time elapsed needs :white_check_mark: 24 | * Log data class store data for plot or evaluation :white_check_mark: 25 | * Make csv class save measurements to csv :white_check_mark: 26 | * PID class :white_check_mark: 27 | * Inverse Kinematics for 2-DOF robotic arm :white_check_mark: 28 | 29 | * Computer Vision library :white_check_mark: 30 | * Capture image class :white_check_mark: 31 | * Image preview class on Jupyter notebook :white_check_mark: 32 | * Aruco artifacts class :white_check_mark: 33 | * Line follower class (camera mode) :white_check_mark: 34 | * Face detection class :white_check_mark: 35 | * Follow the target class (line,face or Aruco artifact) :white_check_mark: 36 | * Approach the target class (face or Aruco artifact) :white_check_mark: 37 | 38 | * Notebooks section 39 | * Courses and Examples :white_check_mark: 40 | 41 | * Browser interface 42 | * Node.js app for the robot management from your browser.:white_check_mark: 43 | 44 | ## :exclamation: **Important Notice** :exclamation: 45 | :cop: The robot fully comply with the three laws of robotics: 46 | 47 | **Asimov's Laws** 48 | 49 | * **First Law:** A robot may not injure a human being or, through inaction, allow a human being to come to harm. 50 | * **Second Law:** A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. 51 | * **Third Law:** A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws. 52 | 53 | ## Explanation of the marks 54 | * :warning: Under Construction, probably errors not ready for use. 55 | * :white_check_mark: Ready for usage. 56 | * :construction: Upcoming release 57 | -------------------------------------------------------------------------------- /source/ext/READM.md: -------------------------------------------------------------------------------- 1 | This file is important for the face detection class, on manually installation place the folder ext to /home/pi. 2 | 3 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/220px-Gravity_gravita_grave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Acceleration and Velocity experiment/images/220px-Gravity_gravita_grave.gif -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/avaccel.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle {\bar {\mathbf {a} }}={\frac {\Delta \mathbf {v} }{\Delta t}}.} 3 | 12 | 31 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/dt.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle (\Delta t)} 3 | 9 | 15 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/dv.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle (\Delta \mathbf {v} )} 3 | 9 | 15 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/nascar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Acceleration and Velocity experiment/images/nascar.jpg -------------------------------------------------------------------------------- /source/notebooks/Courses/Acceleration and Velocity experiment/images/vel.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle {\boldsymbol {\bar {v}}}={\frac {\Delta {\boldsymbol {x}}}{\Delta {\mathit {t}}}}.} 3 | 12 | 31 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Basic robot movement/Basic robot movement.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Basic robot movement" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "A two wheel robot is the simplest robot you can build and offers easy control. The movement of the robot based on diferential speed between the two wheeels. When both of the wheel moving in the same direction with the same speed the robot move in straight line to that direction. If you want to rotate the robot just change the direction of the opposite wheel of the direction you want to turn the robot. " 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "### Let's build that robot with visual controls" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "metadata": {}, 27 | "source": [ 28 | "![two wheel](./images/2_wheel_metal.png)" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "metadata": {}, 34 | "source": [ 35 | "Build a two wheel robot with metal ball caster using the instructions and let's make it to move." 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "metadata": {}, 41 | "source": [ 42 | "First we need to import the proteas_lib and tell to Proteas where the motors are connected." 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": 1, 48 | "metadata": {}, 49 | "outputs": [], 50 | "source": [ 51 | "import ipywidgets as widgets #With that import the user can create visual controls \n", 52 | "from proteas_lib import control\n", 53 | "import time\n", 54 | "control.start_lib()\n", 55 | "motor_a = control.motor(17,27,22)\n", 56 | "motor_b = control.motor(10,11,9)" 57 | ] 58 | }, 59 | { 60 | "cell_type": "markdown", 61 | "metadata": {}, 62 | "source": [ 63 | "Using two sliders we can control the motors speed." 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": 2, 69 | "metadata": {}, 70 | "outputs": [ 71 | { 72 | "data": { 73 | "application/vnd.jupyter.widget-view+json": { 74 | "model_id": "f50d15d82d1c47158b398cb882567e64", 75 | "version_major": 2, 76 | "version_minor": 0 77 | }, 78 | "text/plain": [ 79 | "IntSlider(value=50, description='Speed A:')" 80 | ] 81 | }, 82 | "metadata": {}, 83 | "output_type": "display_data" 84 | }, 85 | { 86 | "data": { 87 | "application/vnd.jupyter.widget-view+json": { 88 | "model_id": "10080ed35be7430eb3309eaa4618fbb2", 89 | "version_major": 2, 90 | "version_minor": 0 91 | }, 92 | "text/plain": [ 93 | "IntSlider(value=50, description='Speed B:')" 94 | ] 95 | }, 96 | "metadata": {}, 97 | "output_type": "display_data" 98 | } 99 | ], 100 | "source": [ 101 | "m1 = widgets.IntSlider(value=50,min=0,max=100,step=1,description='Speed A:')\n", 102 | "m2 = widgets.IntSlider(value=50,min=0,max=100,step=1,description='Speed B:')\n", 103 | "display(m1,m2)" 104 | ] 105 | }, 106 | { 107 | "cell_type": "markdown", 108 | "metadata": {}, 109 | "source": [ 110 | "Its time to add and some contols for the directions of the motors." 111 | ] 112 | }, 113 | { 114 | "cell_type": "code", 115 | "execution_count": 3, 116 | "metadata": {}, 117 | "outputs": [ 118 | { 119 | "data": { 120 | "application/vnd.jupyter.widget-view+json": { 121 | "model_id": "2ea8e9ab95334d8195af1799f6efa068", 122 | "version_major": 2, 123 | "version_minor": 0 124 | }, 125 | "text/plain": [ 126 | "RadioButtons(description='Direction A:', options=('forward', 'reverse'), value='forward')" 127 | ] 128 | }, 129 | "metadata": {}, 130 | "output_type": "display_data" 131 | }, 132 | { 133 | "data": { 134 | "application/vnd.jupyter.widget-view+json": { 135 | "model_id": "48cb86a09f654880a51b68fde61f674c", 136 | "version_major": 2, 137 | "version_minor": 0 138 | }, 139 | "text/plain": [ 140 | "RadioButtons(description='Direction B:', options=('forward', 'reverse'), value='forward')" 141 | ] 142 | }, 143 | "metadata": {}, 144 | "output_type": "display_data" 145 | } 146 | ], 147 | "source": [ 148 | "m1d = widgets.RadioButtons(options=['forward', 'reverse'],value='forward',description='Direction A:')\n", 149 | "m2d = widgets.RadioButtons(options=['forward', 'reverse'],value='forward',description='Direction B:')\n", 150 | "display(m1d,m2d)" 151 | ] 152 | }, 153 | { 154 | "cell_type": "markdown", 155 | "metadata": {}, 156 | "source": [ 157 | "Finally we need one more slider to control the total time of the movement." 158 | ] 159 | }, 160 | { 161 | "cell_type": "code", 162 | "execution_count": 4, 163 | "metadata": {}, 164 | "outputs": [ 165 | { 166 | "data": { 167 | "application/vnd.jupyter.widget-view+json": { 168 | "model_id": "2fd536c7af444e169010c91849791fe8", 169 | "version_major": 2, 170 | "version_minor": 0 171 | }, 172 | "text/plain": [ 173 | "IntSlider(value=1, description='Total time:', max=60)" 174 | ] 175 | }, 176 | "metadata": {}, 177 | "output_type": "display_data" 178 | } 179 | ], 180 | "source": [ 181 | "total_t = widgets.IntSlider(value=1,min=0,max=60,step=1,description='Total time:')\n", 182 | "display(total_t)" 183 | ] 184 | }, 185 | { 186 | "cell_type": "markdown", 187 | "metadata": {}, 188 | "source": [ 189 | "Now its time to write the mainloop for the robot. Using the controls from before you can test the movement of the robot." 190 | ] 191 | }, 192 | { 193 | "cell_type": "code", 194 | "execution_count": 18, 195 | "metadata": {}, 196 | "outputs": [ 197 | { 198 | "name": "stdout", 199 | "output_type": "stream", 200 | "text": [ 201 | "Robot activated\n", 202 | "The robot will be move for 2 seconds\n", 203 | "Robot deactivated\n" 204 | ] 205 | } 206 | ], 207 | "source": [ 208 | "print(\"Robot activated\")\n", 209 | "motor_a.set_speed(m1.value)\n", 210 | "motor_b.set_speed(m2.value)\n", 211 | "print(\"The robot will be move for {} seconds\".format(total_t.value))\n", 212 | "for i in range(1,total_t.value):\n", 213 | " motor_a.move(m1d.value)\n", 214 | " motor_b.move(m2d.value)\n", 215 | " time.sleep(1)\n", 216 | "motor_a.stop()\n", 217 | "motor_b.stop()\n", 218 | "print(\"Robot deactivated\")" 219 | ] 220 | }, 221 | { 222 | "cell_type": "markdown", 223 | "metadata": {}, 224 | "source": [ 225 | "For extra safety if the previous code failed or stoped by the user and the motors keep moving just run the following commands." 226 | ] 227 | }, 228 | { 229 | "cell_type": "code", 230 | "execution_count": 14, 231 | "metadata": {}, 232 | "outputs": [], 233 | "source": [ 234 | "motor_a.stop()\n", 235 | "motor_b.stop()" 236 | ] 237 | }, 238 | { 239 | "cell_type": "code", 240 | "execution_count": 19, 241 | "metadata": {}, 242 | "outputs": [], 243 | "source": [ 244 | "control.clean()" 245 | ] 246 | }, 247 | { 248 | "cell_type": "code", 249 | "execution_count": null, 250 | "metadata": {}, 251 | "outputs": [], 252 | "source": [] 253 | } 254 | ], 255 | "metadata": { 256 | "kernelspec": { 257 | "display_name": "Python 3", 258 | "language": "python", 259 | "name": "python3" 260 | }, 261 | "language_info": { 262 | "codemirror_mode": { 263 | "name": "ipython", 264 | "version": 3 265 | }, 266 | "file_extension": ".py", 267 | "mimetype": "text/x-python", 268 | "name": "python", 269 | "nbconvert_exporter": "python", 270 | "pygments_lexer": "ipython3", 271 | "version": "3.5.3" 272 | } 273 | }, 274 | "nbformat": 4, 275 | "nbformat_minor": 2 276 | } 277 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Basic robot movement/images/2_wheel_metal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Basic robot movement/images/2_wheel_metal.png -------------------------------------------------------------------------------- /source/notebooks/Courses/Distance calculation based on circle theory/images/320px-2pi-unrolled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Distance calculation based on circle theory/images/320px-2pi-unrolled.gif -------------------------------------------------------------------------------- /source/notebooks/Courses/Distance calculation based on circle theory/images/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Distance calculation based on circle theory/images/circle.png -------------------------------------------------------------------------------- /source/notebooks/Courses/Distance calculation based on circle theory/images/circum.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle C=2\pi r=\pi d.\,} 3 | 12 | 23 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Distance calculation based on circle theory/images/cpd.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle {C}=\pi \cdot {d}=2\pi \cdot {r}.\!} 3 | 13 | 26 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Distance calculation based on circle theory/images/pcd.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle \pi ={\frac {C}{d}}.} 3 | 10 | 22 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/.ipynb_checkpoints/Force and levers-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Force and levers" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## 1.0 Theory\n", 15 | "---" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "A lever is a simple machine consisting of a beam or rigid rod pivoted at a fixed hinge, or fulcrum. A lever is a rigid body capable of rotating on a point on itself. On the basis of the location of fulcrum, load and effort, the lever is divided into three types. It is one of the six simple machines identified by Renaissance scientists. A lever amplifies an input force to provide a greater output force, which is said to provide leverage. The ratio of the output force to the input force is the mechanical advantage of the lever.\n", 23 | "![lever example](./images/220px-Palanca-ejemplo.jpg)" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "### Force and levers\n", 31 | "\n", 32 | "A lever in balance\n", 33 | "A lever is a beam connected to ground by a hinge, or pivot, called a fulcrum. The ideal lever does not dissipate or store energy, which means there is no friction in the hinge or bending in the beam. In this case, the power into the lever equals the power out, and the ratio of output to input force is given by the ratio of the distances from the fulcrum to the points of application of these forces. This is known as the law of the lever.[citation needed]\n", 34 | "\n", 35 | "The mechanical advantage of a lever can be determined by considering the balance of moments or torque, T, about the fulcrum.\n", 36 | "![F1](./images/f1.svg) ![F2](./images/f2.svg)\n", 37 | "where F1 is the input force to the lever and F2 is the output force. The distances a and b are the perpendicular distances between the forces and the fulcrum.\n", 38 | "\n", 39 | "Since the moments of torque must be balanced, ![ma](./images/ma.svg) . So, ![t1=t2](./images/t1t2.svg)![f1=f2](./images/f1f2.svg)\n", 40 | "\n", 41 | "This relationship shows that the mechanical advantage can be computed from ratio of the distances from the fulcrum to where the input and output forces are applied to the lever, assuming no losses due to friction, flexibility or wear. This remains true even though the horizontal distance (perpendicular to the pull of gravity) of both a and b change (diminish) as the lever changes to any position away from the horizontal.\n", 42 | "![lever](./images/220px-Lever_Principle_3D.png)\n" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "## 2.0 Experiment\n", 50 | "---" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "metadata": {}, 56 | "source": [ 57 | "Now its time for a small experiment. Attacht the robotic arm to the Proteas robot. If the gripper is attached please remove it. Now set the lower join of the arm to 180 degrees angle and the second join of the arm to 90 degrees angle. The arm should be now parallel to the floor. On the end of the robotic arm hang a small weight using a paper clip as hook and set the lower join to 90 degrees. Repeat that procedure until the arm can not lift the weight. It looks likes impossible but the robotic arm still can lift the weight and maybe much more by using a little trick. First set the upper join to lift the weight and then make the lower join to lift the weight. Why is this happening?" 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 3, 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "from proteas_lib import control\n", 67 | "import time\n", 68 | "control.start_lib()\n", 69 | "l_join = control.servo(pin=23)\n", 70 | "u_join = control.servo(pin=24)\n", 71 | "l_join.set_angle(90)\n", 72 | "u_join.set_angle(180)" 73 | ] 74 | }, 75 | { 76 | "cell_type": "markdown", 77 | "metadata": {}, 78 | "source": [ 79 | "Repeat the code bellow until the arm can't lift the weight" 80 | ] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": 5, 85 | "metadata": {}, 86 | "outputs": [], 87 | "source": [ 88 | "u_join.set_angle(90)\n", 89 | "time.sleep(5)\n", 90 | "u_join.set_angle(180)" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": {}, 96 | "source": [ 97 | "Now the code for the trick" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": 6, 103 | "metadata": {}, 104 | "outputs": [], 105 | "source": [ 106 | "u_join.set_angle(0)\n", 107 | "time.sleep(1)\n", 108 | "u_join.set_angle(90)\n", 109 | "time.sleep(5)\n", 110 | "u_join.set_angle(180)\n", 111 | "time.sleep(1)\n", 112 | "u_join.set_angle(90)" 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "execution_count": 7, 118 | "metadata": {}, 119 | "outputs": [], 120 | "source": [ 121 | "control.clean()" 122 | ] 123 | }, 124 | { 125 | "cell_type": "markdown", 126 | "metadata": {}, 127 | "source": [ 128 | "This is not a correct way to test your robot. In robotics on the designing stage you need to khow what is the maxinum weight arm need to lift. In the calculations of the maxinum lift capacity of the arm the engineer need to khow many parameters, like the weight of the motors, the weight of the arm e.t.c.\n", 129 | "\n", 130 | "Can you calculate, how much is the maxinum lift capacity of the arm by using the equations from the theory?\n", 131 | "\n", 132 | "* Servo motor weight: 38g\n", 133 | "* Servo max torque 5.5kg/cm\n", 134 | "* Motor case weight: 25g\n", 135 | "* Arm extension weight: 18g \n", 136 | "* Arm lenght center to center : 8.8 cm\n" 137 | ] 138 | } 139 | ], 140 | "metadata": { 141 | "kernelspec": { 142 | "display_name": "Python 3", 143 | "language": "python", 144 | "name": "python3" 145 | }, 146 | "language_info": { 147 | "codemirror_mode": { 148 | "name": "ipython", 149 | "version": 3 150 | }, 151 | "file_extension": ".py", 152 | "mimetype": "text/x-python", 153 | "name": "python", 154 | "nbconvert_exporter": "python", 155 | "pygments_lexer": "ipython3", 156 | "version": "3.5.3" 157 | } 158 | }, 159 | "nbformat": 4, 160 | "nbformat_minor": 2 161 | } 162 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/Force and levers.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Force and levers" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## 1.0 Theory\n", 15 | "---" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "A lever is a simple machine consisting of a beam or rigid rod pivoted at a fixed hinge, or fulcrum. A lever is a rigid body capable of rotating on a point on itself. On the basis of the location of fulcrum, load and effort, the lever is divided into three types. It is one of the six simple machines identified by Renaissance scientists. A lever amplifies an input force to provide a greater output force, which is said to provide leverage. The ratio of the output force to the input force is the mechanical advantage of the lever.\n", 23 | "![lever example](./images/220px-Palanca-ejemplo.jpg)" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "### Force and levers\n", 31 | "\n", 32 | "A lever in balance\n", 33 | "A lever is a beam connected to ground by a hinge, or pivot, called a fulcrum. The ideal lever does not dissipate or store energy, which means there is no friction in the hinge or bending in the beam. In this case, the power into the lever equals the power out, and the ratio of output to input force is given by the ratio of the distances from the fulcrum to the points of application of these forces. This is known as the law of the lever.[citation needed]\n", 34 | "\n", 35 | "The mechanical advantage of a lever can be determined by considering the balance of moments or torque, T, about the fulcrum.\n", 36 | "![F1](./images/f1.svg) ![F2](./images/f2.svg)\n", 37 | "where F1 is the input force to the lever and F2 is the output force. The distances a and b are the perpendicular distances between the forces and the fulcrum.\n", 38 | "\n", 39 | "Since the moments of torque must be balanced, ![ma](./images/ma.svg) . So, ![t1=t2](./images/t1t2.svg)![f1=f2](./images/f1f2.svg)\n", 40 | "\n", 41 | "This relationship shows that the mechanical advantage can be computed from ratio of the distances from the fulcrum to where the input and output forces are applied to the lever, assuming no losses due to friction, flexibility or wear. This remains true even though the horizontal distance (perpendicular to the pull of gravity) of both a and b change (diminish) as the lever changes to any position away from the horizontal.\n", 42 | "![lever](./images/220px-Lever_Principle_3D.png)\n" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "## 2.0 Experiment\n", 50 | "---" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "metadata": {}, 56 | "source": [ 57 | "Now its time for a small experiment. Attacht the robotic arm to the Proteas robot. If the gripper is attached please remove it. Now set the lower join of the arm to 180 degrees angle and the second join of the arm to 90 degrees angle. The arm should be now parallel to the floor. On the end of the robotic arm hang a small weight using a paper clip as hook and set the lower join to 90 degrees. Repeat that procedure until the arm can not lift the weight. It looks likes impossible but the robotic arm still can lift the weight and maybe much more by using a little trick. First set the upper join to lift the weight and then make the lower join to lift the weight. Why is this happening?" 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 3, 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "from proteas_lib import control\n", 67 | "import time\n", 68 | "control.start_lib()\n", 69 | "l_join = control.servo(pin=23)\n", 70 | "u_join = control.servo(pin=24)\n", 71 | "l_join.set_angle(90)\n", 72 | "u_join.set_angle(180)" 73 | ] 74 | }, 75 | { 76 | "cell_type": "markdown", 77 | "metadata": {}, 78 | "source": [ 79 | "Repeat the code bellow until the arm can't lift the weight" 80 | ] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": 5, 85 | "metadata": {}, 86 | "outputs": [], 87 | "source": [ 88 | "u_join.set_angle(90)\n", 89 | "time.sleep(5)\n", 90 | "u_join.set_angle(180)" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": {}, 96 | "source": [ 97 | "Now the code for the trick" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": 6, 103 | "metadata": {}, 104 | "outputs": [], 105 | "source": [ 106 | "u_join.set_angle(0)\n", 107 | "time.sleep(1)\n", 108 | "u_join.set_angle(90)\n", 109 | "time.sleep(5)\n", 110 | "u_join.set_angle(180)\n", 111 | "time.sleep(1)\n", 112 | "u_join.set_angle(90)" 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "execution_count": 7, 118 | "metadata": {}, 119 | "outputs": [], 120 | "source": [ 121 | "control.clean()" 122 | ] 123 | }, 124 | { 125 | "cell_type": "markdown", 126 | "metadata": {}, 127 | "source": [ 128 | "This is not a correct way to test your robot. In robotics on the designing stage you need to khow what is the maxinum weight arm need to lift. In the calculations of the maxinum lift capacity of the arm the engineer need to khow many parameters, like the weight of the motors, the weight of the arm e.t.c.\n", 129 | "\n", 130 | "Can you calculate, how much is the maxinum lift capacity of the arm by using the equations from the theory?\n", 131 | "\n", 132 | "* Servo motor weight: 38g\n", 133 | "* Servo max torque 5.5kg/cm\n", 134 | "* Motor case weight: 25g\n", 135 | "* Arm extension weight: 18g \n", 136 | "* Arm lenght center to center : 8.8 cm\n" 137 | ] 138 | } 139 | ], 140 | "metadata": { 141 | "kernelspec": { 142 | "display_name": "Python 3", 143 | "language": "python", 144 | "name": "python3" 145 | }, 146 | "language_info": { 147 | "codemirror_mode": { 148 | "name": "ipython", 149 | "version": 3 150 | }, 151 | "file_extension": ".py", 152 | "mimetype": "text/x-python", 153 | "name": "python", 154 | "nbconvert_exporter": "python", 155 | "pygments_lexer": "ipython3", 156 | "version": "3.5.3" 157 | } 158 | }, 159 | "nbformat": 4, 160 | "nbformat_minor": 2 161 | } 162 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/220px-Lever_Principle_3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Force and levers/images/220px-Lever_Principle_3D.png -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/220px-Palanca-ejemplo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Force and levers/images/220px-Palanca-ejemplo.jpg -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/f1.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle T_{1}=F_{1}a,\quad } 3 | 11 | 22 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/f1f2.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle F_{1}a=F_{2}b\!} 3 | 11 | 22 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/f2.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle T_{2}=F_{2}b\!} 3 | 10 | 20 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/ma.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle MA={\frac {F_{2}}{F_{1}}}={\frac {a}{b}}.\!} 3 | 14 | 41 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Force and levers/images/t1t2.svg: -------------------------------------------------------------------------------- 1 | 2 | {\displaystyle T_{1}=T_{2}\!} 3 | 9 | 18 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Human brain reaction time/.ipynb_checkpoints/Human brain reaction time-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Human brain reaction time" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "The speed of your reactions play a large part in your everyday life. Fast reaction times can produce big rewards, for example, like saving a blistering soccer ball from entering the goal. Slow reaction times may come with consequences. Reaction time is a measure of the quickness an organism responds to some sort of stimulus. You also have \"reflexes\" too. Reflexes and reactions, while seeming similar, are quite different. Reflexes are involuntary, used to protect the body, and are faster than a reaction. Reflexes are usually a negative feedback loop and act to help return the body to its normal functioning stability, or homeostasis. The classic example of a reflex is one you have seen at your doctor's office: the patellar reflex.\n", 15 | "\n", 16 | "![reaction image](./images/reaction1.png)" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "metadata": {}, 22 | "source": [ 23 | "## Experiment" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "Let's make a simple experiment using the Proteas. We need to connect on mini breadboard block, a led and a button. The goal is to press the button when the led lights up in a random moment between 3 and 10 seconds, then the Proteas can tell you, your reaction time." 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 2, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "from proteas_lib import control\n", 40 | "import random #Library for random numbers\n", 41 | "control.start_lib()\n", 42 | "timer1 = control.timer()\n", 43 | "btn = control.button() # Default pin 18\n", 44 | "led = control.gen_output() #Default pin 5\n" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": 3, 50 | "metadata": {}, 51 | "outputs": [ 52 | { 53 | "name": "stdout", 54 | "output_type": "stream", 55 | "text": [ 56 | "Your reaction time is 0.2602088451385498\n" 57 | ] 58 | } 59 | ], 60 | "source": [ 61 | "led.set_off()\n", 62 | "led_state =False\n", 63 | "timer1.start_timer()\n", 64 | "led_time = random.randint(3, 10)\n", 65 | "reaction_time = 0 \n", 66 | "while timer1.get_elapsed() < 10:\n", 67 | " if timer1.get_elapsed() > led_time : \n", 68 | " if led_state== False:\n", 69 | " led.set_on()\n", 70 | " reaction_time = timer1.get_elapsed()\n", 71 | " led_state=True\n", 72 | " else:\n", 73 | " if btn.get_state() == 0 :\n", 74 | " reaction_time = timer1.get_elapsed() - reaction_time\n", 75 | " break\n", 76 | "print(\"Your reaction time is {}\".format(reaction_time))\n" 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 4, 82 | "metadata": {}, 83 | "outputs": [], 84 | "source": [ 85 | "control.clean()" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": null, 91 | "metadata": {}, 92 | "outputs": [], 93 | "source": [] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.5.3" 113 | } 114 | }, 115 | "nbformat": 4, 116 | "nbformat_minor": 2 117 | } 118 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Human brain reaction time/Human brain reaction time.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Human brain reaction time" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "The speed of your reactions play a large part in your everyday life. Fast reaction times can produce big rewards, for example, like saving a blistering soccer ball from entering the goal. Slow reaction times may come with consequences. Reaction time is a measure of the quickness an organism responds to some sort of stimulus. You also have \"reflexes\" too. Reflexes and reactions, while seeming similar, are quite different. Reflexes are involuntary, used to protect the body, and are faster than a reaction. Reflexes are usually a negative feedback loop and act to help return the body to its normal functioning stability, or homeostasis. The classic example of a reflex is one you have seen at your doctor's office: the patellar reflex.\n", 15 | "\n", 16 | "![reaction image](./images/reaction1.png)" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "metadata": {}, 22 | "source": [ 23 | "## Experiment" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "Let's make a simple experiment using the Proteas. We need to connect on mini breadboard block, a led and a button. The goal is to press the button when the led lights up in a random moment between 3 and 10 seconds, then the Proteas can tell you, your reaction time." 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 2, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "from proteas_lib import control\n", 40 | "import random #Library for random numbers\n", 41 | "control.start_lib()\n", 42 | "timer1 = control.timer()\n", 43 | "btn = control.button() # Default pin 18\n", 44 | "led = control.gen_output() #Default pin 5\n" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": 3, 50 | "metadata": {}, 51 | "outputs": [ 52 | { 53 | "name": "stdout", 54 | "output_type": "stream", 55 | "text": [ 56 | "Your reaction time is 0.2602088451385498\n" 57 | ] 58 | } 59 | ], 60 | "source": [ 61 | "led.set_off()\n", 62 | "led_state =False\n", 63 | "timer1.start_timer()\n", 64 | "led_time = random.randint(3, 10)\n", 65 | "reaction_time = 0 \n", 66 | "while timer1.get_elapsed() < 10:\n", 67 | " if timer1.get_elapsed() > led_time : \n", 68 | " if led_state== False:\n", 69 | " led.set_on()\n", 70 | " reaction_time = timer1.get_elapsed()\n", 71 | " led_state=True\n", 72 | " else:\n", 73 | " if btn.get_state() == 0 :\n", 74 | " reaction_time = timer1.get_elapsed() - reaction_time\n", 75 | " break\n", 76 | "print(\"Your reaction time is {}\".format(reaction_time))\n" 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 4, 82 | "metadata": {}, 83 | "outputs": [], 84 | "source": [ 85 | "control.clean()" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": null, 91 | "metadata": {}, 92 | "outputs": [], 93 | "source": [] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.5.3" 113 | } 114 | }, 115 | "nbformat": 4, 116 | "nbformat_minor": 2 117 | } 118 | -------------------------------------------------------------------------------- /source/notebooks/Courses/Human brain reaction time/images/reaction1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/notebooks/Courses/Human brain reaction time/images/reaction1.png -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Blink a led example-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Blink a led example" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 2, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 8, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 4, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 6, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "led_a = control.gen_output()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 9, 49 | "metadata": {}, 50 | "outputs": [], 51 | "source": [ 52 | "for i in range(1,10):\n", 53 | " led_a.set_on()\n", 54 | " time.sleep(0.5)\n", 55 | " led_a.set_off()\n", 56 | " time.sleep(0.5)\n", 57 | " " 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 10, 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "control.clean()" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": null, 72 | "metadata": {}, 73 | "outputs": [], 74 | "source": [] 75 | } 76 | ], 77 | "metadata": { 78 | "kernelspec": { 79 | "display_name": "Python 3", 80 | "language": "python", 81 | "name": "python3" 82 | }, 83 | "language_info": { 84 | "codemirror_mode": { 85 | "name": "ipython", 86 | "version": 3 87 | }, 88 | "file_extension": ".py", 89 | "mimetype": "text/x-python", 90 | "name": "python", 91 | "nbconvert_exporter": "python", 92 | "pygments_lexer": "ipython3", 93 | "version": "3.5.3" 94 | } 95 | }, 96 | "nbformat": 4, 97 | "nbformat_minor": 2 98 | } 99 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Button check-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Button check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "btn = control.button()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "Connect the two terminals of the button direct to a pin and the ground. Return 1 for not pressed 0 for pressed" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 6, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "name": "stdout", 60 | "output_type": "stream", 61 | "text": [ 62 | "1\n", 63 | "1\n", 64 | "1\n", 65 | "1\n", 66 | "1\n", 67 | "0\n", 68 | "0\n", 69 | "0\n", 70 | "0\n", 71 | "1\n", 72 | "1\n", 73 | "1\n", 74 | "1\n", 75 | "0\n", 76 | "0\n", 77 | "1\n", 78 | "1\n", 79 | "1\n", 80 | "1\n" 81 | ] 82 | } 83 | ], 84 | "source": [ 85 | "for i in range(1,20):\n", 86 | " print(btn.get_state())\n", 87 | " time.sleep(0.5)" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": 7, 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [ 96 | "control.clean()" 97 | ] 98 | }, 99 | { 100 | "cell_type": "code", 101 | "execution_count": null, 102 | "metadata": {}, 103 | "outputs": [], 104 | "source": [] 105 | } 106 | ], 107 | "metadata": { 108 | "kernelspec": { 109 | "display_name": "Python 3", 110 | "language": "python", 111 | "name": "python3" 112 | }, 113 | "language_info": { 114 | "codemirror_mode": { 115 | "name": "ipython", 116 | "version": 3 117 | }, 118 | "file_extension": ".py", 119 | "mimetype": "text/x-python", 120 | "name": "python", 121 | "nbconvert_exporter": "python", 122 | "pygments_lexer": "ipython3", 123 | "version": "3.5.3" 124 | } 125 | }, 126 | "nbformat": 4, 127 | "nbformat_minor": 2 128 | } 129 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Collision avoidance robot-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Collision avoidance robot" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Let's build a Collision avoidance robot. Build a 2 wheels robot using the instructions of the wiki. For this robot we need to use the Ultrasonic sensor block to track obstacles in front of the robot." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 5, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from proteas_lib import control\n", 24 | "import time\n", 25 | "import random\n", 26 | "control.start_lib()\n", 27 | "motor_a = control.motor(17,27,22)\n", 28 | "motor_b = control.motor(10,11,9)\n", 29 | "obstacle = control.ultrasonic_sensor()" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": 6, 35 | "metadata": {}, 36 | "outputs": [], 37 | "source": [ 38 | "def forward():\n", 39 | " motor_a.move()\n", 40 | " motor_b.move()\n", 41 | " \n", 42 | "def reverse():\n", 43 | " stop()\n", 44 | " motor_a.move(\"reverse\")\n", 45 | " motor_b.move(\"reverse\")\n", 46 | "\n", 47 | "def right():\n", 48 | " stop()\n", 49 | " motor_a.move()\n", 50 | " motor_b.move(\"reverse\")\n", 51 | " \n", 52 | "def left():\n", 53 | " stop()\n", 54 | " motor_a.move(\"reverse\")\n", 55 | " motor_b.move() \n", 56 | " \n", 57 | "def stop():\n", 58 | " motor_a.stop()\n", 59 | " motor_b.stop()\n", 60 | " \n", 61 | "def set_speed(speed):\n", 62 | " motor_a.set_speed(speed)\n", 63 | " motor_b.set_speed(speed)" 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "metadata": {}, 69 | "source": [ 70 | "### Main loop" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 23, 76 | "metadata": {}, 77 | "outputs": [ 78 | { 79 | "name": "stdout", 80 | "output_type": "stream", 81 | "text": [ 82 | "Reverse\n", 83 | "Reverse\n", 84 | "Left\n", 85 | "Left\n", 86 | "Left\n", 87 | "Left\n", 88 | "Left\n", 89 | "Reverse\n", 90 | "Reverse\n", 91 | "Reverse\n", 92 | "Reverse\n", 93 | "Reverse\n", 94 | "Reverse\n", 95 | "Reverse\n", 96 | "Forward\n", 97 | "Forward\n", 98 | "Forward\n", 99 | "Forward\n", 100 | "Forward\n", 101 | "Forward\n", 102 | "Forward\n", 103 | "Forward\n", 104 | "Forward\n", 105 | "Forward\n", 106 | "Forward\n", 107 | "Forward\n", 108 | "Forward\n", 109 | "Forward\n", 110 | "Forward\n", 111 | "Forward\n", 112 | "Reverse\n", 113 | "Reverse\n", 114 | "Reverse\n", 115 | "Reverse\n", 116 | "Reverse\n", 117 | "Reverse\n", 118 | "Reverse\n", 119 | "Reverse\n", 120 | "Reverse\n", 121 | "Reverse\n", 122 | "Reverse\n", 123 | "Reverse\n" 124 | ] 125 | }, 126 | { 127 | "ename": "KeyboardInterrupt", 128 | "evalue": "", 129 | "output_type": "error", 130 | "traceback": [ 131 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 132 | "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", 133 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0.05\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0mdistance\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobstacle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_distance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 21\u001b[0;31m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0.05\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", 134 | "\u001b[0;31mKeyboardInterrupt\u001b[0m: " 135 | ] 136 | } 137 | ], 138 | "source": [ 139 | "set_speed(50)\n", 140 | "while True:\n", 141 | " distance = obstacle.get_distance()\n", 142 | " if distance > 55 and distance < 2000:\n", 143 | " forward()\n", 144 | " print(\"Forward\")\n", 145 | " elif distance <= 20 or distance > 2000 :\n", 146 | " print(\"Reverse\")\n", 147 | " reverse()\n", 148 | " else:\n", 149 | " direction = random.randrange(1)\n", 150 | " while distance <= 55:\n", 151 | " if direction == 1:\n", 152 | " print(\"Right\")\n", 153 | " right()\n", 154 | " else:\n", 155 | " print(\"Left\")\n", 156 | " left()\n", 157 | " time.sleep(0.05)\n", 158 | " distance = obstacle.get_distance()\n", 159 | " time.sleep(0.05)" 160 | ] 161 | }, 162 | { 163 | "cell_type": "code", 164 | "execution_count": 24, 165 | "metadata": {}, 166 | "outputs": [], 167 | "source": [ 168 | "stop() #Emergency stop if the code above crash!!!" 169 | ] 170 | }, 171 | { 172 | "cell_type": "code", 173 | "execution_count": 25, 174 | "metadata": {}, 175 | "outputs": [], 176 | "source": [ 177 | "control.clean()" 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": null, 183 | "metadata": {}, 184 | "outputs": [], 185 | "source": [] 186 | } 187 | ], 188 | "metadata": { 189 | "kernelspec": { 190 | "display_name": "Python 3", 191 | "language": "python", 192 | "name": "python3" 193 | }, 194 | "language_info": { 195 | "codemirror_mode": { 196 | "name": "ipython", 197 | "version": 3 198 | }, 199 | "file_extension": ".py", 200 | "mimetype": "text/x-python", 201 | "name": "python", 202 | "nbconvert_exporter": "python", 203 | "pygments_lexer": "ipython3", 204 | "version": "3.5.3" 205 | } 206 | }, 207 | "nbformat": 4, 208 | "nbformat_minor": 2 209 | } 210 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Ir obstacle sensor check-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Ir obstacle sensor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "metadata": {}, 40 | "source": [ 41 | "The ir obstacle sensor is a general digital output sensor and we will use the gen_input() class." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 4, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "obs = control.gen_input(19)" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "metadata": {}, 56 | "source": [ 57 | "Start moving a object in front of the sensor and start the bellow for loop." 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 5, 63 | "metadata": {}, 64 | "outputs": [ 65 | { 66 | "name": "stdout", 67 | "output_type": "stream", 68 | "text": [ 69 | "1\n", 70 | "1\n", 71 | "1\n", 72 | "1\n", 73 | "0\n", 74 | "1\n", 75 | "1\n", 76 | "0\n", 77 | "0\n", 78 | "0\n", 79 | "1\n", 80 | "0\n", 81 | "0\n", 82 | "1\n", 83 | "0\n", 84 | "1\n", 85 | "0\n", 86 | "0\n", 87 | "0\n" 88 | ] 89 | } 90 | ], 91 | "source": [ 92 | "for i in range(1,20):\n", 93 | " print(obs.get_state())\n", 94 | " time.sleep(0.1) " 95 | ] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": 6, 100 | "metadata": {}, 101 | "outputs": [], 102 | "source": [ 103 | "control.clean()" 104 | ] 105 | }, 106 | { 107 | "cell_type": "code", 108 | "execution_count": null, 109 | "metadata": {}, 110 | "outputs": [], 111 | "source": [] 112 | } 113 | ], 114 | "metadata": { 115 | "kernelspec": { 116 | "display_name": "Python 3", 117 | "language": "python", 118 | "name": "python3" 119 | }, 120 | "language_info": { 121 | "codemirror_mode": { 122 | "name": "ipython", 123 | "version": 3 124 | }, 125 | "file_extension": ".py", 126 | "mimetype": "text/x-python", 127 | "name": "python", 128 | "nbconvert_exporter": "python", 129 | "pygments_lexer": "ipython3", 130 | "version": "3.5.3" 131 | } 132 | }, 133 | "nbformat": 4, 134 | "nbformat_minor": 2 135 | } 136 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Line follower robot-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Line follower robot" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Let's build a line follower robot. First using Black Electrical Tape to draw a route in the floor. Build a 2 wheels robot using the instructions of the wiki. For this robot we need to use IR Obstacle sensor blocks to track the line and we will arrange them to look the floor." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 2, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from proteas_lib import control\n", 24 | "import time\n", 25 | "control.start_lib()\n", 26 | "motor_a = control.motor(17,27,22)\n", 27 | "motor_b = control.motor(10,11,9)\n", 28 | "sensor_a = control.gen_input(19)\n", 29 | "sensor_b = control.gen_input(26)" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "Lets try something more advance in the code using functions. Using the functions we can group commands and after we can call that group using a name. Let's make some functions." 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 12, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "def forward():\n", 46 | " motor_a.move()\n", 47 | " motor_b.move()\n", 48 | " \n", 49 | "def reverse():\n", 50 | " stop()\n", 51 | " motor_a.move(\"reverse\")\n", 52 | " motor_b.move(\"reverse\")\n", 53 | "\n", 54 | "def right():\n", 55 | " stop()\n", 56 | " motor_a.move()\n", 57 | " motor_b.move(\"reverse\")\n", 58 | " \n", 59 | "def left():\n", 60 | " stop()\n", 61 | " motor_a.move(\"reverse\")\n", 62 | " motor_b.move() \n", 63 | " \n", 64 | "def stop():\n", 65 | " motor_a.stop()\n", 66 | " motor_b.stop()\n", 67 | " \n", 68 | "def set_speed(speed):\n", 69 | " motor_a.set_speed(speed)\n", 70 | " motor_b.set_speed(speed)\n", 71 | " " 72 | ] 73 | }, 74 | { 75 | "cell_type": "markdown", 76 | "metadata": {}, 77 | "source": [ 78 | "## The main loop" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 15, 84 | "metadata": {}, 85 | "outputs": [], 86 | "source": [ 87 | "set_speed(60) #If the robot miss the line try to reduce the speed.\n", 88 | "while True:\n", 89 | " if not sensor_a.get_state() and sensor_b.get_state():\n", 90 | " stop()\n", 91 | " right()\n", 92 | " elif sensor_a.get_state() and not sensor_b.get_state():\n", 93 | " stop()\n", 94 | " left()\n", 95 | " elif sensor_a.get_state() and sensor_b.get_state():\n", 96 | " print('Finish line !!')\n", 97 | " stop()\n", 98 | " break\n", 99 | " else:\n", 100 | " forward() " 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": 14, 106 | "metadata": {}, 107 | "outputs": [], 108 | "source": [ 109 | " stop() #Emergency stop if the code above crash!!!" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": 16, 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "control.clean()" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": null, 124 | "metadata": {}, 125 | "outputs": [], 126 | "source": [] 127 | } 128 | ], 129 | "metadata": { 130 | "kernelspec": { 131 | "display_name": "Python 3", 132 | "language": "python", 133 | "name": "python3" 134 | }, 135 | "language_info": { 136 | "codemirror_mode": { 137 | "name": "ipython", 138 | "version": 3 139 | }, 140 | "file_extension": ".py", 141 | "mimetype": "text/x-python", 142 | "name": "python", 143 | "nbconvert_exporter": "python", 144 | "pygments_lexer": "ipython3", 145 | "version": "3.5.3" 146 | } 147 | }, 148 | "nbformat": 4, 149 | "nbformat_minor": 2 150 | } 151 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/MPU-6050 accelerometer check-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# MPU-6050 accelerometer check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 8, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 2, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 3, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "mpu = control.accelerometer()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 10, 49 | "metadata": {}, 50 | "outputs": [ 51 | { 52 | "name": "stdout", 53 | "output_type": "stream", 54 | "text": [ 55 | "The accelerations is: {'y': 6.514622717285156, 'z': -0.7948749511718749, 'x': 7.788338000488281}\n", 56 | "The gyro results is: {'y': 1.2290076335877862, 'z': -1.9770992366412214, 'x': -4.679389312977099}\n", 57 | "The accelerations is: {'y': 6.593631372070312, 'z': -0.8714894042968749, 'x': 7.635109094238281}\n", 58 | "The gyro results is: {'y': 1.0763358778625953, 'z': -1.8244274809160306, 'x': -4.709923664122138}\n", 59 | "The accelerations is: {'y': 6.49307490234375, 'z': -0.8738836059570312, 'x': 7.601590270996093}\n", 60 | "The gyro results is: {'y': 0.7251908396946565, 'z': -1.5954198473282444, 'x': -4.7251908396946565}\n", 61 | "The accelerations is: {'y': 7.196970190429687, 'z': -1.7621324218749999, 'x': 7.414842541503906}\n", 62 | "The gyro results is: {'y': -26.51145038167939, 'z': -7.320610687022901, 'x': -7.6183206106870225}\n", 63 | "The accelerations is: {'y': -0.93852705078125, 'z': -5.894524487304687, 'x': 8.547299926757812}\n", 64 | "The gyro results is: {'y': 58.58015267175573, 'z': 28.35114503816794, 'x': -41.02290076335878}\n", 65 | "The accelerations is: {'y': 0.0047884033203125, 'z': 9.658209497070311, 'x': 0.8188169677734375}\n", 66 | "The gyro results is: {'y': -16.549618320610687, 'z': -103.82442748091603, 'x': -144.61068702290078}\n", 67 | "The accelerations is: {'y': 3.632003918457031, 'z': 5.6766521362304685, 'x': -4.043806604003906}\n", 68 | "The gyro results is: {'y': 242.14503816793894, 'z': 111.87786259541984, 'x': 250.12977099236642}\n", 69 | "The accelerations is: {'y': -4.867411975097656, 'z': 3.699041564941406, 'x': 6.016628771972656}\n", 70 | "The gyro results is: {'y': 49.38931297709924, 'z': -127.73282442748092, 'x': 112.10687022900764}\n", 71 | "The accelerations is: {'y': 6.196193896484375, 'z': 3.5506010620117183, 'x': -7.56567724609375}\n", 72 | "The gyro results is: {'y': -250.13740458015266, 'z': -97.1145038167939, 'x': -250.13740458015266}\n" 73 | ] 74 | } 75 | ], 76 | "source": [ 77 | "for i in range(1,10):\n", 78 | " print(\"The accelerations is: {}\".format(mpu.get_acceleration()))\n", 79 | " print(\"The gyro results is: {}\".format(mpu.get_gyro()))\n", 80 | " time.sleep(0.5)\n", 81 | " " 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 11, 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "control.clean()" 91 | ] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "execution_count": null, 96 | "metadata": {}, 97 | "outputs": [], 98 | "source": [] 99 | } 100 | ], 101 | "metadata": { 102 | "kernelspec": { 103 | "display_name": "Python 3", 104 | "language": "python", 105 | "name": "python3" 106 | }, 107 | "language_info": { 108 | "codemirror_mode": { 109 | "name": "ipython", 110 | "version": 3 111 | }, 112 | "file_extension": ".py", 113 | "mimetype": "text/x-python", 114 | "name": "python", 115 | "nbconvert_exporter": "python", 116 | "pygments_lexer": "ipython3", 117 | "version": "3.5.3" 118 | } 119 | }, 120 | "nbformat": 4, 121 | "nbformat_minor": 2 122 | } 123 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Motor check -checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Motor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "motor_a = control.motor(17,27,22)\n", 44 | "motor_b = control.motor(10,11,9)" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": {}, 50 | "source": [ 51 | "Check the direction of the motors and correct the direction reversing the two last pin numbers." 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": 5, 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "motor_a.move()\n", 61 | "motor_b.move()\n", 62 | "time.sleep(2)\n", 63 | "motor_a.stop()\n", 64 | "motor_b.stop()" 65 | ] 66 | }, 67 | { 68 | "cell_type": "code", 69 | "execution_count": 6, 70 | "metadata": {}, 71 | "outputs": [], 72 | "source": [ 73 | "motor_a.move(\"reverse\")\n", 74 | "motor_b.move(\"reverse\")\n", 75 | "time.sleep(2)\n", 76 | "motor_a.stop()\n", 77 | "motor_b.stop()" 78 | ] 79 | }, 80 | { 81 | "cell_type": "markdown", 82 | "metadata": {}, 83 | "source": [ 84 | "Rotate left" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": 8, 90 | "metadata": {}, 91 | "outputs": [], 92 | "source": [ 93 | "motor_a.move()\n", 94 | "motor_b.move(\"reverse\")\n", 95 | "time.sleep(0.5)\n", 96 | "motor_a.stop()\n", 97 | "motor_b.stop()" 98 | ] 99 | }, 100 | { 101 | "cell_type": "markdown", 102 | "metadata": {}, 103 | "source": [ 104 | "Rotate right" 105 | ] 106 | }, 107 | { 108 | "cell_type": "code", 109 | "execution_count": 9, 110 | "metadata": {}, 111 | "outputs": [], 112 | "source": [ 113 | "motor_a.move(\"reverse\")\n", 114 | "motor_b.move()\n", 115 | "time.sleep(0.5)\n", 116 | "motor_a.stop()\n", 117 | "motor_b.stop()" 118 | ] 119 | }, 120 | { 121 | "cell_type": "code", 122 | "execution_count": 12, 123 | "metadata": {}, 124 | "outputs": [], 125 | "source": [ 126 | "control.clean()" 127 | ] 128 | } 129 | ], 130 | "metadata": { 131 | "kernelspec": { 132 | "display_name": "Python 3", 133 | "language": "python", 134 | "name": "python3" 135 | }, 136 | "language_info": { 137 | "codemirror_mode": { 138 | "name": "ipython", 139 | "version": 3 140 | }, 141 | "file_extension": ".py", 142 | "mimetype": "text/x-python", 143 | "name": "python", 144 | "nbconvert_exporter": "python", 145 | "pygments_lexer": "ipython3", 146 | "version": "3.5.3" 147 | } 148 | }, 149 | "nbformat": 4, 150 | "nbformat_minor": 2 151 | } 152 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Odometer check-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Odometer check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "metadata": {}, 40 | "source": [ 41 | "Attach the internal odmeter to motor, if you choose the external odometer remove the code related with motors and rotate the wheel by the hand." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 4, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "motor_c = control.motor(10,11,9)" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 5, 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "odometer_a = control.odometer(6)" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": 6, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "odometer_a.reset()\n", 69 | "motor_c.move()\n", 70 | "for i in range(1,10): \n", 71 | " time.sleep(1) \n", 72 | "motor_c.stop()\n" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 10, 78 | "metadata": {}, 79 | "outputs": [ 80 | { 81 | "name": "stdout", 82 | "output_type": "stream", 83 | "text": [ 84 | "2.0734511513692637\n" 85 | ] 86 | } 87 | ], 88 | "source": [ 89 | "print(odometer_a.get_distance())" 90 | ] 91 | }, 92 | { 93 | "cell_type": "code", 94 | "execution_count": 11, 95 | "metadata": {}, 96 | "outputs": [ 97 | { 98 | "name": "stdout", 99 | "output_type": "stream", 100 | "text": [ 101 | "0.1\n" 102 | ] 103 | } 104 | ], 105 | "source": [ 106 | "print(odometer_a.get_revolutions())" 107 | ] 108 | }, 109 | { 110 | "cell_type": "code", 111 | "execution_count": 12, 112 | "metadata": {}, 113 | "outputs": [], 114 | "source": [ 115 | "control.clean()" 116 | ] 117 | } 118 | ], 119 | "metadata": { 120 | "kernelspec": { 121 | "display_name": "Python 3", 122 | "language": "python", 123 | "name": "python3" 124 | }, 125 | "language_info": { 126 | "codemirror_mode": { 127 | "name": "ipython", 128 | "version": 3 129 | }, 130 | "file_extension": ".py", 131 | "mimetype": "text/x-python", 132 | "name": "python", 133 | "nbconvert_exporter": "python", 134 | "pygments_lexer": "ipython3", 135 | "version": "3.5.3" 136 | } 137 | }, 138 | "nbformat": 4, 139 | "nbformat_minor": 2 140 | } 141 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Servo motor control-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Servo motor control" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "servo_1 = control.servo(pin=23)" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 5, 49 | "metadata": {}, 50 | "outputs": [], 51 | "source": [ 52 | "servo_1.set_angle(90)" 53 | ] 54 | }, 55 | { 56 | "cell_type": "raw", 57 | "metadata": {}, 58 | "source": [ 59 | "Servo sweep" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": 10, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "for i in range (0,180):\n", 69 | " servo_1.set_angle(i)\n", 70 | " time.sleep(0.01)\n", 71 | "for i in reversed(range(0,180)):\n", 72 | " servo_1.set_angle(i)\n", 73 | " time.sleep(0.01)" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 11, 79 | "metadata": {}, 80 | "outputs": [], 81 | "source": [ 82 | "control.clean()" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": null, 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.5.3" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 2 114 | } 115 | -------------------------------------------------------------------------------- /source/notebooks/Examples/.ipynb_checkpoints/Ultrasonic obstacle sensor check-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Ultrasonic obstacle sensor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "ultra_obs = control.ultrasonic_sensor()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "When the sensor return values ~2256 and higher should be considered as error values, use code to filter that values." 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 6, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "name": "stdout", 60 | "output_type": "stream", 61 | "text": [ 62 | "2264.232897758484\n", 63 | "2256.0142517089844\n", 64 | "2256.688916683197\n", 65 | "2258.332645893097\n", 66 | "2256.3822507858276\n", 67 | "2256.288206577301\n", 68 | "2257.8256249427795\n", 69 | "2250.588309764862\n", 70 | "2256.3250064849854\n", 71 | "2257.5475811958313\n", 72 | "2256.758427619934\n", 73 | "2256.3945174217224\n", 74 | "2257.0446491241455\n", 75 | "2256.2718510627747\n", 76 | "2256.578516960144\n", 77 | "2257.2041153907776\n", 78 | "2256.210517883301\n", 79 | "1451.3474702835083\n", 80 | "88.58146667480469\n", 81 | "11.67374849319458\n", 82 | "7.339537143707275\n", 83 | "6.623983383178711\n", 84 | "5.511808395385742\n", 85 | "2256.950604915619\n", 86 | "191.21640920639038\n", 87 | "2257.2654485702515\n", 88 | "2258.042335510254\n", 89 | "2257.6375365257263\n", 90 | "2257.298159599304\n", 91 | "2257.187759876251\n", 92 | "2258.009624481201\n", 93 | "2257.4249148368835\n", 94 | "193.35898160934448\n", 95 | "2260.9617948532104\n", 96 | "2257.2736263275146\n", 97 | "2257.0446491241455\n", 98 | "2257.899224758148\n", 99 | "2256.881093978882\n", 100 | "170.3222393989563\n", 101 | "170.8210825920105\n", 102 | "171.9659686088562\n", 103 | "169.7702407836914\n", 104 | "169.59441900253296\n", 105 | "170.19548416137695\n", 106 | "171.1645483970642\n", 107 | "170.40401697158813\n", 108 | "170.39992809295654\n", 109 | "170.64117193222046\n", 110 | "173.13538789749146\n", 111 | "176.14480257034302\n", 112 | "173.62196445465088\n", 113 | "171.92916870117188\n", 114 | "174.23938512802124\n", 115 | "170.99690437316895\n", 116 | "171.29539251327515\n", 117 | "171.61023616790771\n", 118 | "208.91716480255127\n", 119 | "170.9641933441162\n", 120 | "171.066415309906\n", 121 | "171.33219242095947\n", 122 | "171.14819288253784\n", 123 | "172.8123664855957\n", 124 | "173.08632135391235\n", 125 | "170.78019380569458\n", 126 | "195.2439546585083\n", 127 | "174.2639183998108\n", 128 | "23.68687391281128\n", 129 | "19.8392391204834\n", 130 | "18.506264686584473\n", 131 | "13.63232135772705\n", 132 | "172.99227714538574\n", 133 | "20.939147472381592\n", 134 | "42.68789291381836\n", 135 | "173.8141417503357\n", 136 | "173.88774156570435\n", 137 | "173.27849864959717\n", 138 | "171.99459075927734\n", 139 | "172.7673888206482\n", 140 | "174.88542795181274\n", 141 | "173.4624981880188\n", 142 | "172.49752283096313\n", 143 | "173.83867502212524\n", 144 | "173.8100528717041\n", 145 | "172.28899002075195\n", 146 | "173.12312126159668\n", 147 | "2257.8542470932007\n", 148 | "188.04752826690674\n", 149 | "51.15596055984497\n", 150 | "50.36271810531616\n", 151 | "49.389564990997314\n", 152 | "48.54316711425781\n", 153 | "47.68041372299194\n", 154 | "48.1015682220459\n", 155 | "1967.0491099357605\n", 156 | "8.07962417602539\n", 157 | "3.5695910453796387\n", 158 | "5.789852142333984\n", 159 | "2259.6410870552063\n", 160 | "196.22119665145874\n" 161 | ] 162 | } 163 | ], 164 | "source": [ 165 | "for i in range(1,100):\n", 166 | " print(ultra_obs.get_distance())\n", 167 | " time.sleep(0.2)" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": 8, 173 | "metadata": {}, 174 | "outputs": [], 175 | "source": [ 176 | "control.clean()" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": null, 182 | "metadata": {}, 183 | "outputs": [], 184 | "source": [] 185 | } 186 | ], 187 | "metadata": { 188 | "kernelspec": { 189 | "display_name": "Python 3", 190 | "language": "python", 191 | "name": "python3" 192 | }, 193 | "language_info": { 194 | "codemirror_mode": { 195 | "name": "ipython", 196 | "version": 3 197 | }, 198 | "file_extension": ".py", 199 | "mimetype": "text/x-python", 200 | "name": "python", 201 | "nbconvert_exporter": "python", 202 | "pygments_lexer": "ipython3", 203 | "version": "3.5.3" 204 | } 205 | }, 206 | "nbformat": 4, 207 | "nbformat_minor": 2 208 | } 209 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Blink a led example.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Blink a led example" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 2, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 3, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 4, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 5, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "led_a = control.gen_output()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 6, 49 | "metadata": {}, 50 | "outputs": [], 51 | "source": [ 52 | "for i in range(1,10):\n", 53 | " led_a.set_on()\n", 54 | " time.sleep(0.5)\n", 55 | " led_a.set_off()\n", 56 | " time.sleep(0.5)\n", 57 | " " 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 10, 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "control.clean()" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": null, 72 | "metadata": {}, 73 | "outputs": [], 74 | "source": [] 75 | } 76 | ], 77 | "metadata": { 78 | "kernelspec": { 79 | "display_name": "Python 3", 80 | "language": "python", 81 | "name": "python3" 82 | }, 83 | "language_info": { 84 | "codemirror_mode": { 85 | "name": "ipython", 86 | "version": 3 87 | }, 88 | "file_extension": ".py", 89 | "mimetype": "text/x-python", 90 | "name": "python", 91 | "nbconvert_exporter": "python", 92 | "pygments_lexer": "ipython3", 93 | "version": "3.5.3" 94 | } 95 | }, 96 | "nbformat": 4, 97 | "nbformat_minor": 2 98 | } 99 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Button check.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Button check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "btn = control.button()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "Connect the two terminals of the button direct to a pin and the ground. Return 1 for not pressed 0 for pressed" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 6, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "name": "stdout", 60 | "output_type": "stream", 61 | "text": [ 62 | "1\n", 63 | "1\n", 64 | "1\n", 65 | "1\n", 66 | "1\n", 67 | "0\n", 68 | "0\n", 69 | "0\n", 70 | "0\n", 71 | "1\n", 72 | "1\n", 73 | "1\n", 74 | "1\n", 75 | "0\n", 76 | "0\n", 77 | "1\n", 78 | "1\n", 79 | "1\n", 80 | "1\n" 81 | ] 82 | } 83 | ], 84 | "source": [ 85 | "for i in range(1,20):\n", 86 | " print(btn.get_state())\n", 87 | " time.sleep(0.5)" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": 7, 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [ 96 | "control.clean()" 97 | ] 98 | }, 99 | { 100 | "cell_type": "code", 101 | "execution_count": null, 102 | "metadata": {}, 103 | "outputs": [], 104 | "source": [] 105 | } 106 | ], 107 | "metadata": { 108 | "kernelspec": { 109 | "display_name": "Python 3", 110 | "language": "python", 111 | "name": "python3" 112 | }, 113 | "language_info": { 114 | "codemirror_mode": { 115 | "name": "ipython", 116 | "version": 3 117 | }, 118 | "file_extension": ".py", 119 | "mimetype": "text/x-python", 120 | "name": "python", 121 | "nbconvert_exporter": "python", 122 | "pygments_lexer": "ipython3", 123 | "version": "3.5.3" 124 | } 125 | }, 126 | "nbformat": 4, 127 | "nbformat_minor": 2 128 | } 129 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Collision avoidance robot.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Collision avoidance robot" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Let's build a Collision avoidance robot. Build a 2 wheels robot using the instructions of the wiki. For this robot we need to use the Ultrasonic sensor block to track obstacles in front of the robot." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 5, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from proteas_lib import control\n", 24 | "import time\n", 25 | "import random\n", 26 | "control.start_lib()\n", 27 | "motor_a = control.motor(17,27,22)\n", 28 | "motor_b = control.motor(10,11,9)\n", 29 | "obstacle = control.ultrasonic_sensor()" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": 6, 35 | "metadata": {}, 36 | "outputs": [], 37 | "source": [ 38 | "def forward():\n", 39 | " motor_a.move()\n", 40 | " motor_b.move()\n", 41 | " \n", 42 | "def reverse():\n", 43 | " stop()\n", 44 | " motor_a.move(\"reverse\")\n", 45 | " motor_b.move(\"reverse\")\n", 46 | "\n", 47 | "def right():\n", 48 | " stop()\n", 49 | " motor_a.move()\n", 50 | " motor_b.move(\"reverse\")\n", 51 | " \n", 52 | "def left():\n", 53 | " stop()\n", 54 | " motor_a.move(\"reverse\")\n", 55 | " motor_b.move() \n", 56 | " \n", 57 | "def stop():\n", 58 | " motor_a.stop()\n", 59 | " motor_b.stop()\n", 60 | " \n", 61 | "def set_speed(speed):\n", 62 | " motor_a.set_speed(speed)\n", 63 | " motor_b.set_speed(speed)" 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "metadata": {}, 69 | "source": [ 70 | "### Main loop" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 23, 76 | "metadata": {}, 77 | "outputs": [ 78 | { 79 | "name": "stdout", 80 | "output_type": "stream", 81 | "text": [ 82 | "Reverse\n", 83 | "Reverse\n", 84 | "Left\n", 85 | "Left\n", 86 | "Left\n", 87 | "Left\n", 88 | "Left\n", 89 | "Reverse\n", 90 | "Reverse\n", 91 | "Reverse\n", 92 | "Reverse\n", 93 | "Reverse\n", 94 | "Reverse\n", 95 | "Reverse\n", 96 | "Forward\n", 97 | "Forward\n", 98 | "Forward\n", 99 | "Forward\n", 100 | "Forward\n", 101 | "Forward\n", 102 | "Forward\n", 103 | "Forward\n", 104 | "Forward\n", 105 | "Forward\n", 106 | "Forward\n", 107 | "Forward\n", 108 | "Forward\n", 109 | "Forward\n", 110 | "Forward\n", 111 | "Forward\n", 112 | "Reverse\n", 113 | "Reverse\n", 114 | "Reverse\n", 115 | "Reverse\n", 116 | "Reverse\n", 117 | "Reverse\n", 118 | "Reverse\n", 119 | "Reverse\n", 120 | "Reverse\n", 121 | "Reverse\n", 122 | "Reverse\n", 123 | "Reverse\n" 124 | ] 125 | }, 126 | { 127 | "ename": "KeyboardInterrupt", 128 | "evalue": "", 129 | "output_type": "error", 130 | "traceback": [ 131 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 132 | "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", 133 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0.05\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0mdistance\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobstacle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_distance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 21\u001b[0;31m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0.05\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", 134 | "\u001b[0;31mKeyboardInterrupt\u001b[0m: " 135 | ] 136 | } 137 | ], 138 | "source": [ 139 | "set_speed(50)\n", 140 | "while True:\n", 141 | " distance = obstacle.get_distance()\n", 142 | " if distance > 55 and distance < 2000:\n", 143 | " forward()\n", 144 | " print(\"Forward\")\n", 145 | " elif distance <= 20 or distance > 2000 :\n", 146 | " print(\"Reverse\")\n", 147 | " reverse()\n", 148 | " else:\n", 149 | " direction = random.randrange(1)\n", 150 | " while distance <= 55:\n", 151 | " if direction == 1:\n", 152 | " print(\"Right\")\n", 153 | " right()\n", 154 | " else:\n", 155 | " print(\"Left\")\n", 156 | " left()\n", 157 | " time.sleep(0.05)\n", 158 | " distance = obstacle.get_distance()\n", 159 | " time.sleep(0.05)" 160 | ] 161 | }, 162 | { 163 | "cell_type": "code", 164 | "execution_count": 24, 165 | "metadata": {}, 166 | "outputs": [], 167 | "source": [ 168 | "stop() #Emergency stop if the code above crash!!!" 169 | ] 170 | }, 171 | { 172 | "cell_type": "code", 173 | "execution_count": 25, 174 | "metadata": {}, 175 | "outputs": [], 176 | "source": [ 177 | "control.clean()" 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": null, 183 | "metadata": {}, 184 | "outputs": [], 185 | "source": [] 186 | } 187 | ], 188 | "metadata": { 189 | "kernelspec": { 190 | "display_name": "Python 3", 191 | "language": "python", 192 | "name": "python3" 193 | }, 194 | "language_info": { 195 | "codemirror_mode": { 196 | "name": "ipython", 197 | "version": 3 198 | }, 199 | "file_extension": ".py", 200 | "mimetype": "text/x-python", 201 | "name": "python", 202 | "nbconvert_exporter": "python", 203 | "pygments_lexer": "ipython3", 204 | "version": "3.5.3" 205 | } 206 | }, 207 | "nbformat": 4, 208 | "nbformat_minor": 2 209 | } 210 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Ir obstacle sensor check.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Ir obstacle sensor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "metadata": {}, 40 | "source": [ 41 | "The ir obstacle sensor is a general digital output sensor and we will use the gen_input() class." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 4, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "obs = control.gen_input(19)" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "metadata": {}, 56 | "source": [ 57 | "Start moving a object in front of the sensor and start the bellow for loop." 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 5, 63 | "metadata": {}, 64 | "outputs": [ 65 | { 66 | "name": "stdout", 67 | "output_type": "stream", 68 | "text": [ 69 | "1\n", 70 | "1\n", 71 | "1\n", 72 | "1\n", 73 | "0\n", 74 | "1\n", 75 | "1\n", 76 | "0\n", 77 | "0\n", 78 | "0\n", 79 | "1\n", 80 | "0\n", 81 | "0\n", 82 | "1\n", 83 | "0\n", 84 | "1\n", 85 | "0\n", 86 | "0\n", 87 | "0\n" 88 | ] 89 | } 90 | ], 91 | "source": [ 92 | "for i in range(1,20):\n", 93 | " print(obs.get_state())\n", 94 | " time.sleep(0.1) " 95 | ] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": 6, 100 | "metadata": {}, 101 | "outputs": [], 102 | "source": [ 103 | "control.clean()" 104 | ] 105 | }, 106 | { 107 | "cell_type": "code", 108 | "execution_count": null, 109 | "metadata": {}, 110 | "outputs": [], 111 | "source": [] 112 | } 113 | ], 114 | "metadata": { 115 | "kernelspec": { 116 | "display_name": "Python 3", 117 | "language": "python", 118 | "name": "python3" 119 | }, 120 | "language_info": { 121 | "codemirror_mode": { 122 | "name": "ipython", 123 | "version": 3 124 | }, 125 | "file_extension": ".py", 126 | "mimetype": "text/x-python", 127 | "name": "python", 128 | "nbconvert_exporter": "python", 129 | "pygments_lexer": "ipython3", 130 | "version": "3.5.3" 131 | } 132 | }, 133 | "nbformat": 4, 134 | "nbformat_minor": 2 135 | } 136 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Line follower robot.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Line follower robot" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Let's build a line follower robot. First using Black Electrical Tape to draw a route in the floor. Build a 2 wheels robot using the instructions of the wiki. For this robot we need to use IR Obstacle sensor blocks to track the line and we will arrange them to look the floor." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 2, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from proteas_lib import control\n", 24 | "import time\n", 25 | "control.start_lib()\n", 26 | "motor_a = control.motor(17,27,22)\n", 27 | "motor_b = control.motor(10,11,9)\n", 28 | "sensor_a = control.gen_input(19)\n", 29 | "sensor_b = control.gen_input(26)" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "Lets try something more advance in the code using functions. Using the functions we can group commands and after we can call that group using a name. Let's make some functions." 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 12, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "def forward():\n", 46 | " motor_a.move()\n", 47 | " motor_b.move()\n", 48 | " \n", 49 | "def reverse():\n", 50 | " stop()\n", 51 | " motor_a.move(\"reverse\")\n", 52 | " motor_b.move(\"reverse\")\n", 53 | "\n", 54 | "def right():\n", 55 | " stop()\n", 56 | " motor_a.move()\n", 57 | " motor_b.move(\"reverse\")\n", 58 | " \n", 59 | "def left():\n", 60 | " stop()\n", 61 | " motor_a.move(\"reverse\")\n", 62 | " motor_b.move() \n", 63 | " \n", 64 | "def stop():\n", 65 | " motor_a.stop()\n", 66 | " motor_b.stop()\n", 67 | " \n", 68 | "def set_speed(speed):\n", 69 | " motor_a.set_speed(speed)\n", 70 | " motor_b.set_speed(speed)\n", 71 | " " 72 | ] 73 | }, 74 | { 75 | "cell_type": "markdown", 76 | "metadata": {}, 77 | "source": [ 78 | "## The main loop" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 15, 84 | "metadata": {}, 85 | "outputs": [], 86 | "source": [ 87 | "set_speed(60) #If the robot miss the line try to reduce the speed.\n", 88 | "while True:\n", 89 | " if not sensor_a.get_state() and sensor_b.get_state():\n", 90 | " stop()\n", 91 | " right()\n", 92 | " elif sensor_a.get_state() and not sensor_b.get_state():\n", 93 | " stop()\n", 94 | " left()\n", 95 | " elif sensor_a.get_state() and sensor_b.get_state():\n", 96 | " print('Finish line !!')\n", 97 | " stop()\n", 98 | " break\n", 99 | " else:\n", 100 | " forward() " 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": 14, 106 | "metadata": {}, 107 | "outputs": [], 108 | "source": [ 109 | " stop() #Emergency stop if the code above crash!!!" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": 16, 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "control.clean()" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": null, 124 | "metadata": {}, 125 | "outputs": [], 126 | "source": [] 127 | } 128 | ], 129 | "metadata": { 130 | "kernelspec": { 131 | "display_name": "Python 3", 132 | "language": "python", 133 | "name": "python3" 134 | }, 135 | "language_info": { 136 | "codemirror_mode": { 137 | "name": "ipython", 138 | "version": 3 139 | }, 140 | "file_extension": ".py", 141 | "mimetype": "text/x-python", 142 | "name": "python", 143 | "nbconvert_exporter": "python", 144 | "pygments_lexer": "ipython3", 145 | "version": "3.5.3" 146 | } 147 | }, 148 | "nbformat": 4, 149 | "nbformat_minor": 2 150 | } 151 | -------------------------------------------------------------------------------- /source/notebooks/Examples/MPU-6050 accelerometer check.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# MPU-6050 accelerometer check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 8, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 2, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 3, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "mpu = control.accelerometer()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 10, 49 | "metadata": {}, 50 | "outputs": [ 51 | { 52 | "name": "stdout", 53 | "output_type": "stream", 54 | "text": [ 55 | "The accelerations is: {'y': 6.514622717285156, 'z': -0.7948749511718749, 'x': 7.788338000488281}\n", 56 | "The gyro results is: {'y': 1.2290076335877862, 'z': -1.9770992366412214, 'x': -4.679389312977099}\n", 57 | "The accelerations is: {'y': 6.593631372070312, 'z': -0.8714894042968749, 'x': 7.635109094238281}\n", 58 | "The gyro results is: {'y': 1.0763358778625953, 'z': -1.8244274809160306, 'x': -4.709923664122138}\n", 59 | "The accelerations is: {'y': 6.49307490234375, 'z': -0.8738836059570312, 'x': 7.601590270996093}\n", 60 | "The gyro results is: {'y': 0.7251908396946565, 'z': -1.5954198473282444, 'x': -4.7251908396946565}\n", 61 | "The accelerations is: {'y': 7.196970190429687, 'z': -1.7621324218749999, 'x': 7.414842541503906}\n", 62 | "The gyro results is: {'y': -26.51145038167939, 'z': -7.320610687022901, 'x': -7.6183206106870225}\n", 63 | "The accelerations is: {'y': -0.93852705078125, 'z': -5.894524487304687, 'x': 8.547299926757812}\n", 64 | "The gyro results is: {'y': 58.58015267175573, 'z': 28.35114503816794, 'x': -41.02290076335878}\n", 65 | "The accelerations is: {'y': 0.0047884033203125, 'z': 9.658209497070311, 'x': 0.8188169677734375}\n", 66 | "The gyro results is: {'y': -16.549618320610687, 'z': -103.82442748091603, 'x': -144.61068702290078}\n", 67 | "The accelerations is: {'y': 3.632003918457031, 'z': 5.6766521362304685, 'x': -4.043806604003906}\n", 68 | "The gyro results is: {'y': 242.14503816793894, 'z': 111.87786259541984, 'x': 250.12977099236642}\n", 69 | "The accelerations is: {'y': -4.867411975097656, 'z': 3.699041564941406, 'x': 6.016628771972656}\n", 70 | "The gyro results is: {'y': 49.38931297709924, 'z': -127.73282442748092, 'x': 112.10687022900764}\n", 71 | "The accelerations is: {'y': 6.196193896484375, 'z': 3.5506010620117183, 'x': -7.56567724609375}\n", 72 | "The gyro results is: {'y': -250.13740458015266, 'z': -97.1145038167939, 'x': -250.13740458015266}\n" 73 | ] 74 | } 75 | ], 76 | "source": [ 77 | "for i in range(1,10):\n", 78 | " print(\"The accelerations is: {}\".format(mpu.get_acceleration()))\n", 79 | " print(\"The gyro results is: {}\".format(mpu.get_gyro()))\n", 80 | " time.sleep(0.5)\n", 81 | " " 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 11, 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "control.clean()" 91 | ] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "execution_count": null, 96 | "metadata": {}, 97 | "outputs": [], 98 | "source": [] 99 | } 100 | ], 101 | "metadata": { 102 | "kernelspec": { 103 | "display_name": "Python 3", 104 | "language": "python", 105 | "name": "python3" 106 | }, 107 | "language_info": { 108 | "codemirror_mode": { 109 | "name": "ipython", 110 | "version": 3 111 | }, 112 | "file_extension": ".py", 113 | "mimetype": "text/x-python", 114 | "name": "python", 115 | "nbconvert_exporter": "python", 116 | "pygments_lexer": "ipython3", 117 | "version": "3.5.3" 118 | } 119 | }, 120 | "nbformat": 4, 121 | "nbformat_minor": 2 122 | } 123 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Motor check .ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Motor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "motor_a = control.motor(17,27,22)\n", 44 | "motor_b = control.motor(10,11,9)" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": {}, 50 | "source": [ 51 | "Check the direction of the motors and correct the direction reversing the two last pin numbers." 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": 5, 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "motor_a.move()\n", 61 | "motor_b.move()\n", 62 | "time.sleep(2)\n", 63 | "motor_a.stop()\n", 64 | "motor_b.stop()" 65 | ] 66 | }, 67 | { 68 | "cell_type": "code", 69 | "execution_count": 6, 70 | "metadata": {}, 71 | "outputs": [], 72 | "source": [ 73 | "motor_a.move(\"reverse\")\n", 74 | "motor_b.move(\"reverse\")\n", 75 | "time.sleep(2)\n", 76 | "motor_a.stop()\n", 77 | "motor_b.stop()" 78 | ] 79 | }, 80 | { 81 | "cell_type": "markdown", 82 | "metadata": {}, 83 | "source": [ 84 | "Rotate left" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": 8, 90 | "metadata": {}, 91 | "outputs": [], 92 | "source": [ 93 | "motor_a.move()\n", 94 | "motor_b.move(\"reverse\")\n", 95 | "time.sleep(0.5)\n", 96 | "motor_a.stop()\n", 97 | "motor_b.stop()" 98 | ] 99 | }, 100 | { 101 | "cell_type": "markdown", 102 | "metadata": {}, 103 | "source": [ 104 | "Rotate right" 105 | ] 106 | }, 107 | { 108 | "cell_type": "code", 109 | "execution_count": 9, 110 | "metadata": {}, 111 | "outputs": [], 112 | "source": [ 113 | "motor_a.move(\"reverse\")\n", 114 | "motor_b.move()\n", 115 | "time.sleep(0.5)\n", 116 | "motor_a.stop()\n", 117 | "motor_b.stop()" 118 | ] 119 | }, 120 | { 121 | "cell_type": "code", 122 | "execution_count": 12, 123 | "metadata": {}, 124 | "outputs": [], 125 | "source": [ 126 | "control.clean()" 127 | ] 128 | } 129 | ], 130 | "metadata": { 131 | "kernelspec": { 132 | "display_name": "Python 3", 133 | "language": "python", 134 | "name": "python3" 135 | }, 136 | "language_info": { 137 | "codemirror_mode": { 138 | "name": "ipython", 139 | "version": 3 140 | }, 141 | "file_extension": ".py", 142 | "mimetype": "text/x-python", 143 | "name": "python", 144 | "nbconvert_exporter": "python", 145 | "pygments_lexer": "ipython3", 146 | "version": "3.5.3" 147 | } 148 | }, 149 | "nbformat": 4, 150 | "nbformat_minor": 2 151 | } 152 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Odometer check.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Odometer check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "metadata": {}, 40 | "source": [ 41 | "Attach the internal odmeter to motor, if you choose the external odometer remove the code related with motors and rotate the wheel by the hand." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 4, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "motor_c = control.motor(10,11,9)" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 5, 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "odometer_a = control.odometer(6)" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": 6, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "odometer_a.reset()\n", 69 | "motor_c.move()\n", 70 | "for i in range(1,10): \n", 71 | " time.sleep(1) \n", 72 | "motor_c.stop()\n" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 10, 78 | "metadata": {}, 79 | "outputs": [ 80 | { 81 | "name": "stdout", 82 | "output_type": "stream", 83 | "text": [ 84 | "2.0734511513692637\n" 85 | ] 86 | } 87 | ], 88 | "source": [ 89 | "print(odometer_a.get_distance())" 90 | ] 91 | }, 92 | { 93 | "cell_type": "code", 94 | "execution_count": 11, 95 | "metadata": {}, 96 | "outputs": [ 97 | { 98 | "name": "stdout", 99 | "output_type": "stream", 100 | "text": [ 101 | "0.1\n" 102 | ] 103 | } 104 | ], 105 | "source": [ 106 | "print(odometer_a.get_revolutions())" 107 | ] 108 | }, 109 | { 110 | "cell_type": "code", 111 | "execution_count": 12, 112 | "metadata": {}, 113 | "outputs": [], 114 | "source": [ 115 | "control.clean()" 116 | ] 117 | } 118 | ], 119 | "metadata": { 120 | "kernelspec": { 121 | "display_name": "Python 3", 122 | "language": "python", 123 | "name": "python3" 124 | }, 125 | "language_info": { 126 | "codemirror_mode": { 127 | "name": "ipython", 128 | "version": 3 129 | }, 130 | "file_extension": ".py", 131 | "mimetype": "text/x-python", 132 | "name": "python", 133 | "nbconvert_exporter": "python", 134 | "pygments_lexer": "ipython3", 135 | "version": "3.5.3" 136 | } 137 | }, 138 | "nbformat": 4, 139 | "nbformat_minor": 2 140 | } 141 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Servo motor control.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Servo motor control" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "servo_1 = control.servo(pin=23)" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 5, 49 | "metadata": {}, 50 | "outputs": [], 51 | "source": [ 52 | "servo_1.set_angle(90)" 53 | ] 54 | }, 55 | { 56 | "cell_type": "raw", 57 | "metadata": {}, 58 | "source": [ 59 | "Servo sweep" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": 10, 65 | "metadata": {}, 66 | "outputs": [], 67 | "source": [ 68 | "for i in range (0,180):\n", 69 | " servo_1.set_angle(i)\n", 70 | " time.sleep(0.01)\n", 71 | "for i in reversed(range(0,180)):\n", 72 | " servo_1.set_angle(i)\n", 73 | " time.sleep(0.01)" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": 11, 79 | "metadata": {}, 80 | "outputs": [], 81 | "source": [ 82 | "control.clean()" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": null, 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.5.3" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 2 114 | } 115 | -------------------------------------------------------------------------------- /source/notebooks/Examples/Ultrasonic obstacle sensor check.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Ultrasonic obstacle sensor check" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from proteas_lib import control" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "import time" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "control.start_lib()" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 4, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "ultra_obs = control.ultrasonic_sensor()" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "When the sensor return values ~2256 and higher should be considered as error values, use code to filter that values." 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 6, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "name": "stdout", 60 | "output_type": "stream", 61 | "text": [ 62 | "2264.232897758484\n", 63 | "2256.0142517089844\n", 64 | "2256.688916683197\n", 65 | "2258.332645893097\n", 66 | "2256.3822507858276\n", 67 | "2256.288206577301\n", 68 | "2257.8256249427795\n", 69 | "2250.588309764862\n", 70 | "2256.3250064849854\n", 71 | "2257.5475811958313\n", 72 | "2256.758427619934\n", 73 | "2256.3945174217224\n", 74 | "2257.0446491241455\n", 75 | "2256.2718510627747\n", 76 | "2256.578516960144\n", 77 | "2257.2041153907776\n", 78 | "2256.210517883301\n", 79 | "1451.3474702835083\n", 80 | "88.58146667480469\n", 81 | "11.67374849319458\n", 82 | "7.339537143707275\n", 83 | "6.623983383178711\n", 84 | "5.511808395385742\n", 85 | "2256.950604915619\n", 86 | "191.21640920639038\n", 87 | "2257.2654485702515\n", 88 | "2258.042335510254\n", 89 | "2257.6375365257263\n", 90 | "2257.298159599304\n", 91 | "2257.187759876251\n", 92 | "2258.009624481201\n", 93 | "2257.4249148368835\n", 94 | "193.35898160934448\n", 95 | "2260.9617948532104\n", 96 | "2257.2736263275146\n", 97 | "2257.0446491241455\n", 98 | "2257.899224758148\n", 99 | "2256.881093978882\n", 100 | "170.3222393989563\n", 101 | "170.8210825920105\n", 102 | "171.9659686088562\n", 103 | "169.7702407836914\n", 104 | "169.59441900253296\n", 105 | "170.19548416137695\n", 106 | "171.1645483970642\n", 107 | "170.40401697158813\n", 108 | "170.39992809295654\n", 109 | "170.64117193222046\n", 110 | "173.13538789749146\n", 111 | "176.14480257034302\n", 112 | "173.62196445465088\n", 113 | "171.92916870117188\n", 114 | "174.23938512802124\n", 115 | "170.99690437316895\n", 116 | "171.29539251327515\n", 117 | "171.61023616790771\n", 118 | "208.91716480255127\n", 119 | "170.9641933441162\n", 120 | "171.066415309906\n", 121 | "171.33219242095947\n", 122 | "171.14819288253784\n", 123 | "172.8123664855957\n", 124 | "173.08632135391235\n", 125 | "170.78019380569458\n", 126 | "195.2439546585083\n", 127 | "174.2639183998108\n", 128 | "23.68687391281128\n", 129 | "19.8392391204834\n", 130 | "18.506264686584473\n", 131 | "13.63232135772705\n", 132 | "172.99227714538574\n", 133 | "20.939147472381592\n", 134 | "42.68789291381836\n", 135 | "173.8141417503357\n", 136 | "173.88774156570435\n", 137 | "173.27849864959717\n", 138 | "171.99459075927734\n", 139 | "172.7673888206482\n", 140 | "174.88542795181274\n", 141 | "173.4624981880188\n", 142 | "172.49752283096313\n", 143 | "173.83867502212524\n", 144 | "173.8100528717041\n", 145 | "172.28899002075195\n", 146 | "173.12312126159668\n", 147 | "2257.8542470932007\n", 148 | "188.04752826690674\n", 149 | "51.15596055984497\n", 150 | "50.36271810531616\n", 151 | "49.389564990997314\n", 152 | "48.54316711425781\n", 153 | "47.68041372299194\n", 154 | "48.1015682220459\n", 155 | "1967.0491099357605\n", 156 | "8.07962417602539\n", 157 | "3.5695910453796387\n", 158 | "5.789852142333984\n", 159 | "2259.6410870552063\n", 160 | "196.22119665145874\n" 161 | ] 162 | } 163 | ], 164 | "source": [ 165 | "for i in range(1,100):\n", 166 | " print(ultra_obs.get_distance())\n", 167 | " time.sleep(0.2)" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": 8, 173 | "metadata": {}, 174 | "outputs": [], 175 | "source": [ 176 | "control.clean()" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": null, 182 | "metadata": {}, 183 | "outputs": [], 184 | "source": [] 185 | } 186 | ], 187 | "metadata": { 188 | "kernelspec": { 189 | "display_name": "Python 3", 190 | "language": "python", 191 | "name": "python3" 192 | }, 193 | "language_info": { 194 | "codemirror_mode": { 195 | "name": "ipython", 196 | "version": 3 197 | }, 198 | "file_extension": ".py", 199 | "mimetype": "text/x-python", 200 | "name": "python", 201 | "nbconvert_exporter": "python", 202 | "pygments_lexer": "ipython3", 203 | "version": "3.5.3" 204 | } 205 | }, 206 | "nbformat": 4, 207 | "nbformat_minor": 2 208 | } 209 | -------------------------------------------------------------------------------- /source/robot_library/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Christos Chronis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/robot_library/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include proteas_lib/ext/* 2 | -------------------------------------------------------------------------------- /source/robot_library/README.md: -------------------------------------------------------------------------------- 1 | ## GSOC 2019 - A DIY robot kit for educators 2 | 3 | The proteas library is a python robotics library for 4 | Raspberry Pi. This library created for the "GSOC 2019 - A DIY robot kit for educators" 5 | by Christos Chronis. This library mainly designed to work along the Jupyter Notebook 6 | but works fine direct from any python script. You can easly control all the electronics 7 | parts of a robot with minimun requirement the GPIO pin number. In the library you can also find 8 | some applications of computer vision with OpenCV, such as face detection, arruco artifact detection 9 | e.t.c.. More informations on https://github.com/eellak/gsoc2019-diyrobot. 10 | 11 | -------------------------------------------------------------------------------- /source/robot_library/proteas_lib/__init__.py: -------------------------------------------------------------------------------- 1 | from . import control 2 | from . import vision 3 | 4 | __all__ = [ 5 | 'control', 6 | 'vision' 7 | ] 8 | -------------------------------------------------------------------------------- /source/robot_library/proteas_lib/vision.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2, PIL 3 | from cv2 import aruco 4 | import matplotlib.pyplot as plt 5 | import matplotlib as mpl 6 | from IPython.display import display, HTML,clear_output 7 | import PIL.Image 8 | 9 | class aruco_find(): 10 | def __init__(self): 11 | self.aruco_dict = aruco.Dictionary_get(aruco.DICT_6X6_250) 12 | self.parameters = aruco.DetectorParameters_create() 13 | self.ids = [] 14 | self.corners = [] 15 | self.cx = 0 16 | self.cy = 0 17 | self.width = 0 18 | self.height=0 19 | def to_gray(self,image): 20 | return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) 21 | def detect(self,image): 22 | corners, ids, rejectedImgPoints = aruco.detectMarkers(image, self.aruco_dict, parameters=self.parameters) 23 | return corners, ids, rejectedImgPoints 24 | def mark_image(self,image,corners, ids): 25 | if ids is not None: 26 | self.ids = self.marks_to_list(ids) 27 | self.corners = self.marks_to_list(corners) 28 | else: 29 | self.ids = [] 30 | self.corners = [] 31 | image_marked = aruco.drawDetectedMarkers(image.copy(), corners, ids) 32 | return image_marked 33 | def detect_artifacts(self,image): 34 | gray = self.to_gray(image) 35 | corners, ids, rejectedImgPoints = self.detect(gray) 36 | final = self.mark_image(image,corners, ids) 37 | return final 38 | def marks_to_list(self,nplist): 39 | temp = [] 40 | nplist = np.array(nplist).tolist() 41 | for item in nplist: 42 | temp.append(item[0]) 43 | return temp 44 | def find(self,ar_id): 45 | if len(self.ids)>0: 46 | if ar_id in self.ids: 47 | i = self.ids.index(ar_id) 48 | x1=self.corners[i][0][0] 49 | x2=self.corners[i][1][0] 50 | y1=self.corners[i][0][1] 51 | y2=self.corners[i][3][1] 52 | self.cx = int(((x2-x1)/2)+x1) 53 | self.cy = int(((y2-y1)/2)+y1) 54 | self.width = x2-x1 55 | self.height = y2-y1 56 | else: 57 | self.cx = 0 58 | self.cy = 0 59 | self.width = 0 60 | self.height = 0 61 | def mark_frame(self,frame): 62 | height, width, channels = frame.shape 63 | cv2.line(frame,(self.cx,0),(self.cx,height),(255,0,0),1) 64 | cv2.line(frame,(0,self.cy),(width,self.cy),(255,0,0),1) 65 | return frame 66 | def get_pos(self): 67 | return self.cx,self.cy 68 | def get_rect(self): 69 | return self.width,self.height 70 | 71 | class camera(): 72 | def __init__(self,camera=0): 73 | self.camera = camera 74 | self.cap = cv2.VideoCapture(self.camera) 75 | def take_frame(self): 76 | ret, frame = self.cap.read() 77 | return frame 78 | def stop(self): 79 | self.cap.release() 80 | 81 | class show_image(): 82 | def __init__(self,jupyter=True): 83 | self.jupyter = jupyter 84 | def cpreview(self,frame): 85 | cv2.imshow('frame',frame) 86 | cv2.waitKey(1) 87 | def jpreview(self,frame): 88 | im = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) 89 | display(PIL.Image.fromarray(im)) 90 | clear_output(wait=True) 91 | def preview(self,frame): 92 | if self.jupyter: 93 | self.jpreview(frame) 94 | else: 95 | self.cpreview(frame) 96 | def clear(self): 97 | if self.jupyter: 98 | clear_output(wait=True) 99 | else: 100 | cv2.destroyAllWindows() 101 | 102 | class face_detection(): 103 | def __init__(self): 104 | cascPath = '/home/pi/ext/haarcascade_frontalface_default.xml' 105 | self.faceCascade = cv2.CascadeClassifier(cascPath) 106 | self.cx = 0 107 | self.cy = 0 108 | self.width = 0 109 | self.height=0 110 | self.faces_num = 0 111 | def detect_face(self,frame): 112 | gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) 113 | faces = self.faceCascade.detectMultiScale(gray, 114 | scaleFactor=1.1, 115 | minNeighbors=5, 116 | minSize=(30, 30), 117 | flags=cv2.CASCADE_SCALE_IMAGE) 118 | if len(faces) > 0: 119 | self.faces_num = len(faces) 120 | (x,y,w,h)= faces[0] 121 | cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2) 122 | self.cx = int(((w/2)+x)) 123 | self.cy = int(((h/2)+y)) 124 | self.width = w 125 | self.height = h 126 | fheight, fwidth, channels = frame.shape 127 | cv2.line(frame,(self.cx,0),(self.cx,fwidth),(255,0,0),1) 128 | cv2.line(frame,(0,self.cy),(fwidth,self.cy),(255,0,0),1) 129 | cv2.circle(frame,(self.cx, self.cy), 5, (0,255,0), -1) 130 | else: 131 | self.faces_num = 0 132 | self.cx = 0 133 | self.cy = 0 134 | self.width = 0 135 | self.height = 0 136 | return frame 137 | def get_faces(self): 138 | return self.faces_num 139 | def get_pos(self): 140 | return self.cx,self.cy 141 | def get_rect(self): 142 | return self.width,self.height 143 | 144 | class robot_center(): 145 | def __init__(self,width=640): 146 | self.width = width 147 | self.step = int(width/5) 148 | self.w1 = self.step*2 149 | self.w2 = self.step*3 150 | 151 | def direction(self,posx): 152 | if posx >0 and posx < self.w1: 153 | print("Go Right") 154 | return 2 155 | elif posx >self.w2 and posx < self.width: 156 | print("Go Left") 157 | return 1 158 | elif posx == 0: 159 | print("No detection") 160 | return -1 161 | else: 162 | print("Stay") 163 | return 0 164 | 165 | class robot_follow(): 166 | def __init__(self,width=640): 167 | self.width = width 168 | self.max= int(width/2) 169 | def direction(self,rx): 170 | if rx < self.max and rx > 0: 171 | print("Forward") 172 | return 1 173 | elif rx > (self.max + 30): 174 | print("Back") 175 | return 2 176 | elif rx == 0: 177 | print("No detection") 178 | return -1 179 | else: 180 | print("Stay") 181 | return 0 182 | 183 | 184 | 185 | class line_follower(): 186 | def __init__(self,width=640,height=480,w=160,h=60): 187 | self.width = width 188 | self.height = height 189 | self.cx = 0 190 | self.cy = 0 191 | self.x1 = max(0,int((self.width/2) - (w/2))) 192 | self.x2 = min(int((self.width/2) + (w/2)),self.width) 193 | self.y1 = max(0,int((self.height/2) - (h/2))) 194 | self.y2 = min(int((self.height/2) + (h/2)),self.height) 195 | 196 | def detect_line(self,frame): 197 | crop_img = frame[self.y1:self.y2, self.x1:self.x2] 198 | gray = cv2.cvtColor(crop_img, cv2.COLOR_BGR2GRAY) 199 | blur = cv2.GaussianBlur(gray,(5,5),0) 200 | ret,thresh = cv2.threshold(blur,60,255,cv2.THRESH_BINARY_INV) 201 | contours,hierarchy = cv2.findContours(thresh.copy(), 1, cv2.CHAIN_APPROX_NONE) 202 | if len(contours) > 0: 203 | c = max(contours, key=cv2.contourArea) 204 | M = cv2.moments(c) 205 | if M['m00'] != 0: 206 | self.cx = int(M['m10']/M['m00']) 207 | self.cy = int(M['m01']/M['m00']) 208 | cv2.line(crop_img,(self.cx,0),(self.cx,self.height),(255,0,0),1) 209 | cv2.line(crop_img,(0,self.cy),(self.width,self.cy),(255,0,0),1) 210 | cv2.drawContours(crop_img, contours, -1, (0,255,0), 1) 211 | else: 212 | self.cx = 0 213 | self.cy = 0 214 | else: 215 | self.cx = 0 216 | self.cy = 0 217 | 218 | return crop_img 219 | 220 | def get_pos(self): 221 | return self.cx,self.cy 222 | -------------------------------------------------------------------------------- /source/robot_library/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | with open('README.md') as readme_file: 4 | README = readme_file.read() 5 | 6 | setup_args = dict( 7 | name="proteas_lib", 8 | version="1.0.0", 9 | author="Christos Chronis", 10 | author_email="hronis@hotmail.com", 11 | description="A Rasperry Pi robot library for educators.", 12 | long_description_content_type="text/markdown", 13 | long_description= README, 14 | url="https://github.com/eellak/gsoc2019-diyrobot", 15 | keywords=['Robot', 'STEM', 'Educational robot', '3D Printed Robot'], 16 | packages=find_packages(), 17 | include_package_data = True, 18 | classifiers=[ 19 | "Programming Language :: Python :: 3", 20 | "License :: OSI Approved :: MIT License", 21 | "Operating System :: OS Independent", 22 | ] 23 | ) 24 | 25 | 26 | requirements = ['netifaces','mpu6050-raspberrypi','Pillow','matplotlib'] 27 | 28 | if __name__ == '__main__': 29 | 30 | setup(**setup_args, install_requires=requirements, setup_requires=requirements) 31 | -------------------------------------------------------------------------------- /source/webserver_robot_manager/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | var fs = require("fs"); 4 | var path = require('path'); 5 | var exec = require('child_process').exec; 6 | 7 | var options = { 8 | name: 'Proteas Sudo Prompt', 9 | }; 10 | 11 | app.use(express.static("public")); 12 | 13 | 14 | 15 | app.get('/shutdown', function (req, res) { 16 | exec('sudo /sbin/shutdown -r now', function (msg) { console.log(msg) }); 17 | }) 18 | 19 | app.get('/restart', function (req, res) { 20 | exec('sudo /sbin/reboot', function (msg) { console.log(msg) }); 21 | }) 22 | 23 | 24 | 25 | var server = app.listen(8080, function () { 26 | var host = server.address().address 27 | var port = server.address().port 28 | console.log("App listening at http://%s:%s", host, port) 29 | }) 30 | -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/bgr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/bgr.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/blue-cog-md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/blue-cog-md.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/gsoc-gfoss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/gsoc-gfoss.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/jupyter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/jupyter.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/proteas_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/proteas_main.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/restart.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/shutdown.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/user-manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/user-manual.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/images/user.png -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Proteas Robot 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 | 12 |
13 |
14 |

Proteas Robot

15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |

Connect to Jupyter

24 |
25 | 26 | 27 |
28 |

Connect to Jupyter Notebook to create a new project! 29 | The default password is "proteas".

30 | 31 | 32 |
33 | 34 |
35 |
36 |
37 |
38 | 39 |
40 |
41 |
42 |

Handbook

43 |
44 | 45 | 46 |
47 |

Offline instructions for the robot

48 | 49 | 50 |
51 | 52 |
53 |
54 |
55 |
56 | 57 |
58 |
59 |
60 |

Settings

61 |
62 | 63 | 64 |
65 |

Restart or Shutdown

66 | 67 | 68 | 69 | 70 | 71 |
72 | 73 |
74 |
75 |
76 |
77 | 78 |
79 |
80 |
81 |

Project informations

82 |
83 | 84 | 85 |
86 |

For more informations please visit the Github page https://github.com/eellak/gsoc2019-diyrobot for the project.

87 | 88 | 89 |
90 | 91 |
92 |
93 |
94 |
95 | 96 | 97 | 98 | 99 |
100 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /source/webserver_robot_manager/public/instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eellak/gsoc2019-diyrobot/2121e696a534e01b0700abc31303ed00691724b4/source/webserver_robot_manager/public/instructions.pdf -------------------------------------------------------------------------------- /third_party_licenses/OpenCV_Contrib_LICENSE: -------------------------------------------------------------------------------- 1 | By downloading, copying, installing or using the software you agree to this license. 2 | If you do not agree to this license, do not download, install, 3 | copy or use the software. 4 | 5 | 6 | License Agreement 7 | For Open Source Computer Vision Library 8 | (3-clause BSD License) 9 | 10 | Copyright (C) 2000-2018, Intel Corporation, all rights reserved. 11 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 12 | Copyright (C) 2009-2015, NVIDIA Corporation, all rights reserved. 13 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | Copyright (C) 2015-2018, OpenCV Foundation, all rights reserved. 15 | Copyright (C) 2015-2016, Itseez Inc., all rights reserved. 16 | Third party copyrights are property of their respective owners. 17 | 18 | Redistribution and use in source and binary forms, with or without modification, 19 | are permitted provided that the following conditions are met: 20 | 21 | * Redistributions of source code must retain the above copyright notice, 22 | this list of conditions and the following disclaimer. 23 | 24 | * Redistributions in binary form must reproduce the above copyright notice, 25 | this list of conditions and the following disclaimer in the documentation 26 | and/or other materials provided with the distribution. 27 | 28 | * Neither the names of the copyright holders nor the names of the contributors 29 | may be used to endorse or promote products derived from this software 30 | without specific prior written permission. 31 | 32 | This software is provided by the copyright holders and contributors "as is" and 33 | any express or implied warranties, including, but not limited to, the implied 34 | warranties of merchantability and fitness for a particular purpose are disclaimed. 35 | In no event shall copyright holders or contributors be liable for any direct, 36 | indirect, incidental, special, exemplary, or consequential damages 37 | (including, but not limited to, procurement of substitute goods or services; 38 | loss of use, data, or profits; or business interruption) however caused 39 | and on any theory of liability, whether in contract, strict liability, 40 | or tort (including negligence or otherwise) arising in any way out of 41 | the use of this software, even if advised of the possibility of such damage. 42 | -------------------------------------------------------------------------------- /third_party_licenses/OpenCV_LICENSE: -------------------------------------------------------------------------------- 1 | By downloading, copying, installing or using the software you agree to this license. 2 | If you do not agree to this license, do not download, install, 3 | copy or use the software. 4 | 5 | 6 | License Agreement 7 | For Open Source Computer Vision Library 8 | (3-clause BSD License) 9 | 10 | Copyright (C) 2000-2019, Intel Corporation, all rights reserved. 11 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 12 | Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved. 13 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved. 15 | Copyright (C) 2015-2016, Itseez Inc., all rights reserved. 16 | Third party copyrights are property of their respective owners. 17 | 18 | Redistribution and use in source and binary forms, with or without modification, 19 | are permitted provided that the following conditions are met: 20 | 21 | * Redistributions of source code must retain the above copyright notice, 22 | this list of conditions and the following disclaimer. 23 | 24 | * Redistributions in binary form must reproduce the above copyright notice, 25 | this list of conditions and the following disclaimer in the documentation 26 | and/or other materials provided with the distribution. 27 | 28 | * Neither the names of the copyright holders nor the names of the contributors 29 | may be used to endorse or promote products derived from this software 30 | without specific prior written permission. 31 | 32 | This software is provided by the copyright holders and contributors "as is" and 33 | any express or implied warranties, including, but not limited to, the implied 34 | warranties of merchantability and fitness for a particular purpose are disclaimed. 35 | In no event shall copyright holders or contributors be liable for any direct, 36 | indirect, incidental, special, exemplary, or consequential damages 37 | (including, but not limited to, procurement of substitute goods or services; 38 | loss of use, data, or profits; or business interruption) however caused 39 | and on any theory of liability, whether in contract, strict liability, 40 | or tort (including negligence or otherwise) arising in any way out of 41 | the use of this software, even if advised of the possibility of such damage. 42 | --------------------------------------------------------------------------------