diff --git a/examples/Braccio_Basic/Braccio_Basic.ino b/examples/Braccio_Basic/Braccio_Basic.ino new file mode 100644 index 0000000..f275daa --- /dev/null +++ b/examples/Braccio_Basic/Braccio_Basic.ino @@ -0,0 +1,88 @@ +/* + * @brief Activating the "MOVE" button by pressing + * the joystick enables a waving motion of the arm. + */ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +/************************************************************************************** + * GLOBAL CONSTANTS + **************************************************************************************/ + +float const home_position[6] = {SmartServoClass::MAX_ANGLE / 2.0f, + SmartServoClass::MAX_ANGLE / 2.0f, + SmartServoClass::MAX_ANGLE / 2.0f, + SmartServoClass::MAX_ANGLE / 2.0f, + SmartServoClass::MAX_ANGLE / 2.0f, + 90.0f}; +static const char * btnm_map[] = {"Move", "\0"}; + +/************************************************************************************** + * GLOBAL VARIABLES + **************************************************************************************/ + +bool move_joint = false; + +/************************************************************************************** + * FUNCTIONS + **************************************************************************************/ + +static void event_handler(lv_event_t * e) +{ + lv_event_code_t code = lv_event_get_code(e); + lv_obj_t * obj = lv_event_get_target(e); + if (code == LV_EVENT_CLICKED) + { + uint32_t id = lv_btnmatrix_get_selected_btn(obj); + const char * txt = lv_btnmatrix_get_btn_text(obj, id); + + LV_LOG_USER("%s was pressed\n", txt); + if (Serial) Serial.println(txt); + + if (strcmp(txt, "Move") == 0) + move_joint = !move_joint; + } +} + +void customMenu() +{ + lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); + lv_btnmatrix_set_map(btnm1, btnm_map); + lv_btnmatrix_set_btn_ctrl(btnm1, 0, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_obj_align(btnm1, LV_ALIGN_CENTER, 0, 0); + lv_obj_add_event_cb(btnm1, event_handler, LV_EVENT_ALL, NULL); + Braccio.connectJoystickTo(btnm1); +} + +/************************************************************************************** + * SETUP/LOOP + **************************************************************************************/ + +void setup() +{ + Serial.begin(115200); + for (auto const start = millis(); !Serial && ((millis() - start) < 5000); delay(10)) { } + + if (!Braccio.begin(customMenu)) { + if (Serial) Serial.println("Braccio.begin() failed."); + for(;;) { } + } + + Braccio.moveTo(home_position[0], home_position[1], home_position[2], home_position[3], home_position[4], home_position[5]); + delay(1000); +} + +void loop() +{ + if (move_joint) + { + Braccio.move(4).to((SmartServoClass::MAX_ANGLE / 2.0f) - 45.0f).in(1s); + delay(1000); + Braccio.move(4).to((SmartServoClass::MAX_ANGLE / 2.0f) + 45.0f).in(1s); + delay(1000); + } +} diff --git a/examples/LearnByDoing/LearnByDoing.ino b/examples/Braccio_LearnByDoing/Braccio_LearnByDoing.ino similarity index 79% rename from examples/LearnByDoing/LearnByDoing.ino rename to examples/Braccio_LearnByDoing/Braccio_LearnByDoing.ino index 760218a..3015f39 100644 --- a/examples/LearnByDoing/LearnByDoing.ino +++ b/examples/Braccio_LearnByDoing/Braccio_LearnByDoing.ino @@ -1,7 +1,19 @@ -#include "Braccio++.h" +/* + * @brief Learn the arm an movement and replay it. + */ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include #include "FlashIAPBlockDevice.h" #include "FATFileSystem.h" +/************************************************************************************** + * VARIABLES + **************************************************************************************/ + enum states { LEARN, REPEAT, @@ -14,6 +26,10 @@ float values[10000]; float* idx = values; float* final_idx = 0; +/************************************************************************************** + * FUNCTIONS + **************************************************************************************/ + static void event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); @@ -95,9 +111,14 @@ void customMenu() { static FlashIAPBlockDevice bd(XIP_BASE + 0x100000, 0x100000); static mbed::FATFileSystem fs("fs"); -void setup() { +/************************************************************************************** + * SETUP/LOOP + **************************************************************************************/ +void setup() +{ Serial.begin(115200); + while (!Serial) { } // Mount file system for load/store movements int err = fs.mount(&bd); diff --git a/examples/Braccio__Template/Braccio__Template.ino b/examples/Braccio__Template/Braccio__Template.ino deleted file mode 100644 index e3c2725..0000000 --- a/examples/Braccio__Template/Braccio__Template.ino +++ /dev/null @@ -1,54 +0,0 @@ -#include "Braccio++.h" - -int demo_mode = 0; - -static void event_handler(lv_event_t * e) -{ - lv_event_code_t code = lv_event_get_code(e); - lv_obj_t * obj = lv_event_get_target(e); - if (code == LV_EVENT_CLICKED) { - uint32_t id = lv_btnmatrix_get_selected_btn(obj); - const char * txt = lv_btnmatrix_get_btn_text(obj, id); - - LV_LOG_USER("%s was pressed\n", txt); - Serial.println(txt); - if (strcmp(txt, "Demo") == 0) { - demo_mode = 1; - Braccio.pingOff(); - } else { - Braccio.pingOn(); - demo_mode = 0; - } - } -} - - -static const char * btnm_map[] = {"Demo", "Learn", "\n", - "Repeat", "Unlock", "\n", "\0" - }; - -void customMenu() { - lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); - lv_btnmatrix_set_map(btnm1, btnm_map); - lv_btnmatrix_set_btn_ctrl(btnm1, 0, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm1, 1, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm1, 2, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm1, 3, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_obj_align(btnm1, LV_ALIGN_CENTER, 0, 0); - lv_obj_add_event_cb(btnm1, event_handler, LV_EVENT_ALL, NULL); - Braccio.connectJoystickTo(btnm1); -} - -void setup() { - // Call Braccio.begin() for default menu or pass a function for custom menu - Braccio.begin(customMenu); -} - -void loop() { - if (demo_mode) { - Braccio.move(4).to(20.0f); - delay(1000); - Braccio.move(4).to(10.0f); - delay(1000); - } -} diff --git a/examples/LCD_Custom_Menu/LCD_Custom_Menu.ino b/examples/LCD_Custom_Menu/LCD_Custom_Menu.ino index 2eff457..c5c779b 100644 --- a/examples/LCD_Custom_Menu/LCD_Custom_Menu.ino +++ b/examples/LCD_Custom_Menu/LCD_Custom_Menu.ino @@ -1,19 +1,43 @@ -#include "Braccio++.h" +/* + * @brief This sketch demonstrates how to build a very simple and basic custom menu. + */ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +/************************************************************************************** + * DEFINE + **************************************************************************************/ #define MARGIN_LEFT 0 #define MARGIN_TOP 0 +/************************************************************************************** + * CONSTANTS + **************************************************************************************/ + static const char * btnm_map[] = {"Option 1", "\n", "Option 2", "\n", "Option 3", "\n", "\0" }; +/************************************************************************************** + * FUNCTIONS + **************************************************************************************/ + void customMenu(){ lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); lv_btnmatrix_set_map(btnm1, btnm_map); lv_obj_align(btnm1, LV_ALIGN_CENTER, MARGIN_LEFT, MARGIN_TOP); } +/************************************************************************************** + * SETUP/LOOP + **************************************************************************************/ + void setup() { Braccio.begin(customMenu); } diff --git a/examples/LCD_Menu_Joystick/LCD_Menu_Joystick.ino b/examples/LCD_Menu_Joystick/LCD_Menu_Joystick.ino index fba5ae6..fdab2fb 100644 --- a/examples/LCD_Menu_Joystick/LCD_Menu_Joystick.ino +++ b/examples/LCD_Menu_Joystick/LCD_Menu_Joystick.ino @@ -1,8 +1,35 @@ -#include "Braccio++.h" +/* + * @brief This sketch demonstrates how to build a very simple + * and basic custom menu interacting with the Braccio++ carriers + * joystick. + */ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +/************************************************************************************** + * DEFINE + **************************************************************************************/ #define MARGIN_LEFT 0 #define MARGIN_TOP 0 +/************************************************************************************** + * CONSTANT + **************************************************************************************/ + +static const char * btnm_map[] = {"Option 1", "Option 2", "\n", + "Option 3", "Option 4", "\n", + "Option 5", "Option 6", "\n", "\0" + }; + +/************************************************************************************** + * FUNCTIONS + **************************************************************************************/ + static void event_handler(lv_event_t * e){ lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); @@ -15,11 +42,6 @@ static void event_handler(lv_event_t * e){ } } -static const char * btnm_map[] = {"Option 1", "Option 2", "\n", - "Option 3", "Option 4", "\n", - "Option 5", "Option 6", "\n", "\0" - }; - void customMenu(){ lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); lv_btnmatrix_set_map(btnm1, btnm_map); @@ -34,6 +56,10 @@ void customMenu(){ Braccio.connectJoystickTo(btnm1); } +/************************************************************************************** + * SETUP/LOOP + **************************************************************************************/ + void setup() { Braccio.begin(customMenu); } diff --git a/examples/LCD_Motors/LCD_Motors.ino b/examples/LCD_Motors/LCD_Motors.ino index 62334fe..3fee9b6 100644 --- a/examples/LCD_Motors/LCD_Motors.ino +++ b/examples/LCD_Motors/LCD_Motors.ino @@ -1,7 +1,35 @@ -#include "Braccio++.h" +/* + * @brief This sketch demonstrates how to build a very simple + * and basic custom menu interacting with the Braccio++ carriers + * joystick, allowing to control a specific motor by selecting + * it from the menu. + */ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +/************************************************************************************** + * VARIABLES + **************************************************************************************/ int selected_motor = 0; +/************************************************************************************** + * CONSTANTS + **************************************************************************************/ + +static const char * btnm_map[] = {"Motor 1", "Motor 2", "\n", + "Motor 3", "Motor 4", "\n", + "Motor 5", "Motor 6", "\n", "\0" + }; + +/************************************************************************************** + * FUNCTIONS + **************************************************************************************/ + static void event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); @@ -37,12 +65,6 @@ static void event_handler(lv_event_t * e) } } - -static const char * btnm_map[] = {"Motor 1", "Motor 2", "\n", - "Motor 3", "Motor 4", "\n", - "Motor 5", "Motor 6", "\n", "\0" - }; - void customMenu() { lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); lv_btnmatrix_set_map(btnm1, btnm_map); @@ -57,8 +79,11 @@ void customMenu() { Braccio.connectJoystickTo(btnm1); } +/************************************************************************************** + * SETUP/LOOP + **************************************************************************************/ + void setup() { - // Call Braccio.begin() for default menu or pass a function for custom menu Braccio.begin(customMenu); Serial.begin(115200); } diff --git a/examples/New_APIs/New_APIs.ino b/examples/New_APIs/New_APIs.ino deleted file mode 100644 index 877ff2c..0000000 --- a/examples/New_APIs/New_APIs.ino +++ /dev/null @@ -1,33 +0,0 @@ -#include "Braccio++.h" - -auto elbow = Braccio.get(1); - -void setup() { - Serial.begin(115200); - while (!Serial); - Braccio.begin(); -} - -void loop() { - - if (elbow) { - elbow.move().to(122.7).in(1s); - delay(1000); - elbow.move().to(11.9).in(100ms); - } - Serial.println(elbow.position()); - - // Should move all the motors at once - Braccio.moveTo(10.0, 20.0, 30.0, 40.0, 50.0, 60.0); - - // You can choose the speed beforehand with - Braccio.speed(FAST); // could be MEDIUM or SLOW too - - float a1, a2, a3, a4, a5, a6; - Braccio.positions(a1, a2, a3, a4, a5, a6); - Serial.println("Motor positions are: " + String(a1) + " " + String(a2) + " " + String(a3) + " " + String(a4) + " " + String(a5) + " " + String(a6)); - - // Can also use the more compact notation - float values[6]; - Braccio.positions(values); -} diff --git a/examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button/01_creating_a_button.ino b/examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button/01_creating_a_button.ino index 1cc8416..a3bef7a 100644 --- a/examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button/01_creating_a_button.ino +++ b/examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button/01_creating_a_button.ino @@ -1,4 +1,4 @@ - #include "Braccio++.h" + #include void customMenu() { lv_obj_t * btn1 = lv_btn_create(lv_scr_act()); diff --git a/examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button/02_designing_the_button.ino b/examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button/02_designing_the_button.ino index 8818453..c261fd3 100644 --- a/examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button/02_designing_the_button.ino +++ b/examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button/02_designing_the_button.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Arduino Colors #define COLOR_TEAL 0x00878F diff --git a/examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu/03_creating_a_menu.ino b/examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu/03_creating_a_menu.ino index 1a4f832..4647025 100644 --- a/examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu/03_creating_a_menu.ino +++ b/examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu/03_creating_a_menu.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out/04_testing_it_out.ino b/examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out/04_testing_it_out.ino index 1d4a705..1da4f2f 100644 --- a/examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out/04_testing_it_out.ino +++ b/examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out/04_testing_it_out.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge/05_display_challenge.ino b/examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge/05_display_challenge.ino index 50e760c..d4fcba7 100644 --- a/examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge/05_display_challenge.ino +++ b/examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge/05_display_challenge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick/01_playing_with_the_Joystick.ino b/examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick/01_playing_with_the_Joystick.ino index db53831..70fd320 100644 --- a/examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick/01_playing_with_the_Joystick.ino +++ b/examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick/01_playing_with_the_Joystick.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include String message = ""; diff --git a/examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu/02_handling_events_in_the_menu.ino b/examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu/02_handling_events_in_the_menu.ino index e1c118c..f0f6d88 100644 --- a/examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu/02_handling_events_in_the_menu.ino +++ b/examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu/02_handling_events_in_the_menu.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I/03_navigate_challenge_I.ino b/examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I/03_navigate_challenge_I.ino index 8a25ba3..557600a 100644 --- a/examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I/03_navigate_challenge_I.ino +++ b/examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I/03_navigate_challenge_I.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II/04_navigate_challenge_II.ino b/examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II/04_navigate_challenge_II.ino index f3a9ca9..5754fce 100644 --- a/examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II/04_navigate_challenge_II.ino +++ b/examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II/04_navigate_challenge_II.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define MARGIN_LEFT 0 #define MARGIN_TOP 0 diff --git a/examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors/01_playing_with_the_motors.ino b/examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors/01_playing_with_the_motors.ino index faa1e04..6b7399f 100644 --- a/examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors/01_playing_with_the_motors.ino +++ b/examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors/01_playing_with_the_motors.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include int motorID= 0; diff --git a/examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button/02_selecting_the_motor_with_the_enter_button.ino b/examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button/02_selecting_the_motor_with_the_enter_button.ino index 861dd5b..c3f2270 100644 --- a/examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button/02_selecting_the_motor_with_the_enter_button.ino +++ b/examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button/02_selecting_the_motor_with_the_enter_button.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define BUTTON_ENTER 6 diff --git a/examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick/03_moving_the_motors_with_the_joystick.ino b/examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick/03_moving_the_motors_with_the_joystick.ino index 30ad751..10b5be0 100644 --- a/examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick/03_moving_the_motors_with_the_joystick.ino +++ b/examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick/03_moving_the_motors_with_the_joystick.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define JOYSTICK_LEFT 1 #define JOYSTICK_RIGHT 2 diff --git a/examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge/04_servo_motors_challenge.ino b/examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge/04_servo_motors_challenge.ino index 11302ff..04503c1 100644 --- a/examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge/04_servo_motors_challenge.ino +++ b/examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge/04_servo_motors_challenge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define JOYSTICK_LEFT 1 #define JOYSTICK_RIGHT 2 diff --git a/examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge/01_playing_with_a_joint_angle_gauge.ino b/examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge/01_playing_with_a_joint_angle_gauge.ino index bad15f8..53d50ea 100644 --- a/examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge/01_playing_with_a_joint_angle_gauge.ino +++ b/examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge/01_playing_with_a_joint_angle_gauge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define JOYSTICK_LEFT 1 #define JOYSTICK_RIGHT 2 diff --git a/examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu/02_selecting_the_motor_in_the_LCD_menu.ino b/examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu/02_selecting_the_motor_in_the_LCD_menu.ino index 04ad83f..5ecfeff 100644 --- a/examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu/02_selecting_the_motor_in_the_LCD_menu.ino +++ b/examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu/02_selecting_the_motor_in_the_LCD_menu.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Joystick #define JOYSTICK_LEFT 1 diff --git a/examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I/03_learnings_challenge_I.ino b/examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I/03_learnings_challenge_I.ino index 517e3da..f9f25b2 100644 --- a/examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I/03_learnings_challenge_I.ino +++ b/examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I/03_learnings_challenge_I.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Joystick #define JOYSTICK_LEFT 1 diff --git a/examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II/04_learnings_challenge_II.ino b/examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II/04_learnings_challenge_II.ino index 3593e5b..a84e5f5 100644 --- a/examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II/04_learnings_challenge_II.ino +++ b/examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II/04_learnings_challenge_II.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Joystick #define JOYSTICK_LEFT 1 diff --git a/examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio/01_aligning_braccio.ino b/examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio/01_aligning_braccio.ino index bf7f178..bd0c162 100644 --- a/examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio/01_aligning_braccio.ino +++ b/examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio/01_aligning_braccio.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Variables // Braccio ++ joints diff --git a/examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio/02_waving_with_Braccio.ino b/examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio/02_waving_with_Braccio.ino index 57e081a..2bda3b1 100644 --- a/examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio/02_waving_with_Braccio.ino +++ b/examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio/02_waving_with_Braccio.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define BUTTON_ENTER 6 diff --git a/examples/tutorials/projects/p01-moving-braccio/03_moving_challenge/03_moving_challenge.ino b/examples/tutorials/projects/p01-moving-braccio/03_moving_challenge/03_moving_challenge.ino index 5667946..2999342 100644 --- a/examples/tutorials/projects/p01-moving-braccio/03_moving_challenge/03_moving_challenge.ino +++ b/examples/tutorials/projects/p01-moving-braccio/03_moving_challenge/03_moving_challenge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define BUTTON_ENTER 6 diff --git a/examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio/01_controlling_manually_Braccio.ino b/examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio/01_controlling_manually_Braccio.ino index a3adb85..8fc3fc0 100644 --- a/examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio/01_controlling_manually_Braccio.ino +++ b/examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio/01_controlling_manually_Braccio.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define BUTTON_ENTER 6 diff --git a/examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge/02_manual_control_challenge.ino b/examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge/02_manual_control_challenge.ino index 557afb6..629c6ab 100644 --- a/examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge/02_manual_control_challenge.ino +++ b/examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge/02_manual_control_challenge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include #define BUTTON_ENTER 6 diff --git a/examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode/01_Braccio_learning_mode.ino b/examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode/01_Braccio_learning_mode.ino index c2b8ab3..16faee9 100644 --- a/examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode/01_Braccio_learning_mode.ino +++ b/examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode/01_Braccio_learning_mode.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Colors #define COLOR_TEAL 0x00878F diff --git a/examples/tutorials/projects/p03-learning-mode/02_learning_challenge/02_learning_challenge.ino b/examples/tutorials/projects/p03-learning-mode/02_learning_challenge/02_learning_challenge.ino index d1eef79..45686cb 100644 --- a/examples/tutorials/projects/p03-learning-mode/02_learning_challenge/02_learning_challenge.ino +++ b/examples/tutorials/projects/p03-learning-mode/02_learning_challenge/02_learning_challenge.ino @@ -1,4 +1,4 @@ -#include "Braccio++.h" +#include // Colors #define COLOR_TEAL 0x00878F diff --git a/src/Braccio++.cpp b/src/Braccio++.cpp index 29ec05f..45d5cde 100644 --- a/src/Braccio++.cpp +++ b/src/Braccio++.cpp @@ -135,7 +135,7 @@ bool BraccioClass::begin(voidFuncPtr custom_menu) lvgl_defaultMenu(); _servos.begin(); - _servos.setTime(SmartServoClass::BROADCAST, SLOW); + _servos.setTime(SLOW); _servos.setPositionMode(PositionMode::IMMEDIATE); _motors_connected_thd.start(mbed::callback(this, &BraccioClass::motorConnectedThreadFunc));