Skip to content

Commit

Permalink
Using IMU data
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Apr 4, 2021
1 parent 84a9f6f commit 54196dd
Show file tree
Hide file tree
Showing 34 changed files with 4,642 additions and 2,039 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/TestCompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
build-properties:
RobotCarBlueDisplay:
-DBLUETOOTH_BAUD_RATE=BAUD_115200
-DUSE_STANDARD_SERIAL
-DUSE_US_SENSOR_1_PIN_MODE
-DDISTANCE_SERVO_IS_MOUNTED_HEAD_DOWN
-DUSE_ADAFRUIT_MOTOR_SHIELD
Expand All @@ -44,7 +43,6 @@ jobs:
RobotCarBlueDisplay:
-DUSE_LAYOUT_FOR_NANO
-DBLUETOOTH_BAUD_RATE=BAUD_115200
-DUSE_STANDARD_SERIAL
-DUSE_US_SENSOR_1_PIN_MODE
-DDISTANCE_SERVO_IS_MOUNTED_HEAD_DOWN
-DCAR_HAS_PAN_SERVO
Expand All @@ -58,7 +56,6 @@ jobs:
build-properties:
RobotCarBlueDisplay:
-DBLUETOOTH_BAUD_RATE=BAUD_115200
-DUSE_STANDARD_SERIAL
-DUSE_US_SENSOR_1_PIN_MODE
-DDISTANCE_SERVO_IS_MOUNTED_HEAD_DOWN
-DCAR_HAS_TOF_DISTANCE_SENSOR
Expand All @@ -76,22 +73,20 @@ jobs:
ref: master
path: CustomLibrary_BD # must contain string "Custom"

- name: Checkout new PWMMotorControl library
uses: actions/checkout@v2
with:
repository: ArminJo/PWMMotorControl
ref: master
path: CustomLibrary_PWM # must contain string "Custom"
# Currently included in source directory
# - name: Checkout new PWMMotorControl library
# uses: actions/checkout@v2
# with:
# repository: ArminJo/PWMMotorControl
# ref: master
# path: CustomLibrary_PWM # must contain string "Custom"

# Use the arduino-test-compile script, because it is faster
- name: Compile all examples using the bash script arduino-test-compile.sh
env:
# Passing parameters to the script by setting the appropriate ENV_* variables.
ENV_ARDUINO_BOARD_FQBN: ${{ matrix.arduino-boards-fqbn }}
ENV_REQUIRED_LIBRARIES: ${{ env.REQUIRED_LIBRARIES }}
ENV_EXAMPLES_BUILD_PROPERTIES: ${{ toJson(matrix.build-properties) }}
run: |
wget --quiet https://raw.githubusercontent.com/ArminJo/arduino-test-compile/master/arduino-test-compile.sh
ls -l arduino-test-compile.sh
chmod +x arduino-test-compile.sh
./arduino-test-compile.sh
- name: Compile all examples using the arduino-test-compile action
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
arduino-platform: ${{ matrix.arduino-platform }}
platform-url: ${{ matrix.platform-url }}
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Just overwrite the function doUserCollisionDetection() to test your own skill.

You may also overwrite the function fillAndShowForwardDistancesInfo(), if you use your own scanning method.

# Compile options / macros
# Compile options / macros for this software
To customize the software to different car extensions, there are some compile options / macros available.<br/>
Modify it by commenting them out or in, or change the values if applicable. Or define the macro with the -D compiler option for gobal compile (the latter is not possible with the Arduino IDE, so consider to use [Sloeber](https://eclipse.baeyens.it).<br/>
Modify it by commenting them out or in, or change the values if applicable. Or define the macro with the -D compiler option for global compile (the latter is not possible with the Arduino IDE, so consider using [Sloeber](https://eclipse.baeyens.it).<br/>
Compile options for the used **PWMMotorControl library** like `USE_ENCODER_MOTOR_CONTROL` are described [here](https://github.com/ArminJo/PWMMotorControl#compile-options--macros-for-this-library).

| Option | Default | File | Description |
Expand All @@ -25,22 +25,24 @@ Compile options for the used **PWMMotorControl library** like `USE_ENCODER_MOTOR
| `USE_US_SENSOR_1_PIN_MODE` | disabled | RobotCar.h | Use modified HC-SR04 modules or HY-SRF05 ones.</br>Modify HC-SR04 by connecting 10kOhm between echo and trigger and then use only trigger pin. |
| `CAR_HAS_IR_DISTANCE_SENSOR` | disabled | RobotCar.h | Use Sharp GP2Y0A21YK / 1080 IR distance sensor. |
| `CAR_HAS_TOF_DISTANCE_SENSOR` | disabled | RobotCar.h | Use VL53L1X TimeOfFlight distance sensor. |
| `DISTANCE_SERVO_IS_MOUNTED_HEAD_DOWN` | disabled | Distance.h | The distance servo is mounted head down to detect even small obstacles. |
| `DISTANCE_SERVO_IS_MOUNTED_HEAD_DOWN` | disabled | Distance.h | The distance servo is mounted head down to detect even small obstacles. The Servo direction is reverse then. |
| `CAR_HAS_CAMERA` | disabled | RobotCar.h | Enables the `Camera` button for the `PIN_CAMERA_SUPPLY_CONTROL` pin. |
| `CAR_HAS_LASER` | disabled | RobotCar.h | Enables the `Laser` button for the `PIN_LASER_OUT` / `LED_BUILTIN` pin. |
| `CAR_HAS_PAN_SERVO` | disabled | RobotCar.h | Enables the pan slider for the `PanServo` at the `PIN_PAN_SERVO` pin. |
| `CAR_HAS_TILT_SERVO` | disabled | RobotCar.h | Enables the tilt slider for the `TiltServo` at the `PIN_TILT_SERVO` pin.. |
| `MONITOR_LIPO_VOLTAGE` | disabled | RobotCar.h | Shows VIN voltage and monitors it for undervoltage. Requires 2 additional resistors at pin A2. |
| `VIN_VOLTAGE_CORRECTION` | undefined | RobotCar.h | Voltage to be subtracted from VIN voltage. E.g. if there is a series diode between LIPO and VIN set it to 0.8. |
| `CAR_HAS_TILT_SERVO` | disabled | RobotCar.h | Enables the tilt slider for the `TiltServo` at the `PIN_TILT_SERVO` pin. |
| `ENABLE_RTTTL` | undefined | RobotCar.h | Plays melody after initial timeout has reached. Enables the Melody button, which plays a random melody. |
| `MONITOR_VIN_VOLTAGE` | disabled | RobotCar.h | Shows VIN voltage and monitors it for undervoltage. VIN/11 at A2, 1MOhm to VIN, 100kOhm to ground. |
| `VIN_VOLTAGE_CORRECTION` | undefined or 0.8 for UNO | RobotCar.h | Voltage to be subtracted from VIN voltage for voltage monitoring. E.g. if there is a series diode between LIPO and VIN as on the UNO boards, set it to 0.8. |
| `SUPPORT_EEPROM_STORAGE` | disabled | RobotCar.h | Activates the buttons to store compensation and drive speed. |

### Modifying library properties with Arduino IDE
First use *Sketch/Show Sketch Folder (Ctrl+K)*.<br/>
### Modifying compile options with Arduino IDE
First, use *Sketch > Show Sketch Folder (Ctrl+K)*.<br/>
If you did not yet stored the example as your own sketch, then you are instantly in the right library folder.<br/>
Otherwise you have to navigate to the parallel `libraries` folder and select the library you want to access.<br/>
In both cases the library files itself are located in the `src` directory.<br/>

### Modifying library properties with Sloeber IDE
If you are using Sloeber as your IDE, you can easily define global symbols with *Properties/Arduino/CompileOptions*.<br/>
### Modifying compile options with Sloeber IDE
If you are using Sloeber as your IDE, you can easily define global symbols with *Properties > Arduino > CompileOptions*.<br/>
![Sloeber settings](https://github.com/ArminJo/ServoEasing/blob/master/pictures/SloeberDefineSymbols.png)

# Wall detection
Expand Down
Binary file removed pictures/WIN_20161218_15_08_55_Pro.jpg
Binary file not shown.
Loading

0 comments on commit 54196dd

Please sign in to comment.