Robot Romeo mini

Robot Romeo mini

thingiverse

Children love The link to the Romeo mini card is https://www.dfrobot.com/product-1367.html?search=romeo%20mini The links for the libraries to install are https://github.com/Arduinolibrary/DFRobot_Flame_Wheel_Vehicle/raw/master/ROMEO_M.zip https://github.com/CainZ/GoBle/archive/master.zip And the good program is /* ---Flamewheel Bluetooth Control Program //------2016.6.29 by LL //------Suitable for Romeo BLE Mini MCU //http://www.dfrobot.com/index.php?route=product/product&product_id=1367&search=ble+mini&description=true#.V8AR1q11Zfc */ #include "GoBLE.h" #include <Romeo_m.h> #define LED 13 // GoBLE Goble(Serial); int joystickX, joystickY; int buttonState[7]; unsigned int led_count; void setup() { Romeo_m.Initialise(); Goble.begin(); pinMode(LED, OUTPUT); } void loop() { if (Goble.available()) { readGoBle(); motorContrl(); } delayLedBlink(); //delay 10ms and led blink } // Read GoBLE values void readGoBle() { // read joystick value when there's valid command from bluetooth joystickX = Goble.readJoystickX(); joystickY = Goble.readJoystickY(); // read button state when there's valid command from bluetooth buttonState[SWITCH_UP] = Goble.readSwitchUp(); buttonState[SWITCH_DOWN] = Goble.readSwitchDown(); buttonState[SWITCH_LEFT] = Goble.readSwitchLeft(); buttonState[SWITCH_RIGHT] = Goble.readSwitchRight(); buttonState[SWITCH_SELECT] = Goble.readSwitchSelect(); buttonState[SWITCH_START] = Goble.readSwitchStart(); } // Move according to GoBLE value //Joystick left and right to turn bends, left and right buttons to spin on the spot void motorContrl() { if ((buttonState[SWITCH_UP] == PRESSED) || ((joystickX > 128) && (joystickY >= 64) && (joystickY <= 192))) { Romeo_m.motorControl(Forward, 200, Forward, 200); //go forward return; //end function } if ((buttonState[SWITCH_DOWN] == PRESSED) || ((joystickX < 128) && (joystickY >= 64) && (joystickY <= 192))) { Romeo_m.motorControl(Reverse, 150, Reverse, 150); //go backwards return; //end function } if (buttonState[SWITCH_LEFT] == PRESSED) { Romeo_m.motorControl(Reverse, 100, Forward, 100); //turn left return; //end function } if ((joystickY < 128 ) && (joystickX >= 64 ) && ( joystickX <= 192) ) { Romeo_m.motorControl_M1(Forward, 80); //turn left big bend Romeo_m.motorControl_M2(Forward, 200); return; //end function } if ( buttonState[SWITCH_RIGHT] == PRESSED) { Romeo_m.motorControl(Forward, 100, Reverse, 100); //turn right return; //end function } if ((joystickY > 128) && (joystickX >= 64) && (joystickX <= 192)) { Romeo_m.motorControl_M2(Forward, 80); //turn right big bend Romeo_m.motorControl_M1(Forward, 200); return; //big bend } Romeo_m.motorStop(); //no stop button is pressed } // led blink function, each execution delay 10ms. every 100 times level inverted void delayLedBlink() { delay(10); led_count++; if (led_count > 100) { digitalWrite(LED, !digitalRead(LED)); led_count = 0; } }

Download Model from thingiverse

With this file you will be able to print Robot Romeo mini with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Robot Romeo mini.