updated 640
This commit is contained in:
112
640.md
112
640.md
@@ -56,11 +56,11 @@ Each address jumper has a binary value - A0 = 1, A1 = 2, A3 = 4, A4 = 8
|
||||
|
||||
The starting address for the 640 board is 0x60 - if we solder jumper A0 then the address will be 0x60 + 1 = 0x61. Soldering A0 and A1 will give us 0x60 + 1 + 2 = 0x63
|
||||
|
||||
## Setup your 640
|
||||
# Setup your 640
|
||||
|
||||
Now that we know what each part of the board is for, it's time to solder all the connections - it doesn't matter what order you attach the connections to your board, but we've found that the order below is the simplest.
|
||||
|
||||
### Assemble the parts
|
||||
## Assemble the parts
|
||||
|
||||
**IMPORTANT** - if you have an expansion board that you want to add to your 640 board, then you should add that first as it will be a lot easier than adding it after soldering connectors to the board.
|
||||
|
||||
@@ -70,7 +70,7 @@ As we don't know what headers and connectors you selected when you ordered your
|
||||
|
||||
*Hint* - A lump of plasticine or clay is very useful to hold your board level.
|
||||
|
||||
### Attach the 3 pin servo header
|
||||
## Attach the 3 pin servo header
|
||||
|
||||
The first part to slot into place is the 3 x 3 connector for the CPPM and Servos. The holes for this part are aligned so that the connector should fit tightly and be held in place.
|
||||
|
||||
@@ -78,7 +78,7 @@ The first part to slot into place is the 3 x 3 connector for the CPPM and Servos
|
||||
|
||||
Slot it in place, but don't solder it yet.
|
||||
|
||||
### Attach the motor and power terminals
|
||||
## Attach the motor and power terminals
|
||||
|
||||
Now we need to add the motor and power connectors - slot each in place making sure that you have them the right way around (for the screw terminals the holes should be at the front of the board).
|
||||
|
||||
@@ -88,7 +88,7 @@ Use a piece of paper or card to hold the connectors in place and turn the board
|
||||
|
||||
Make sure everything is lined up correctly - use extra plasticine to align connectors if needed. Once you are happy, solder each of the pins.
|
||||
|
||||
### Attach the header
|
||||
## Attach the header
|
||||
|
||||
For this example we'll show you how to connect a stackable header, as it's the most complex.
|
||||
|
||||
@@ -104,13 +104,13 @@ Once you have your header in place, use some plasticine to make sure the board i
|
||||
|
||||
Now that your board is set up, it's time to configure your Raspberry Pi so that you can use it.
|
||||
|
||||
## Setting up your Pi
|
||||
# Setting up your Pi
|
||||
|
||||
Before we can start using the 640 board we need to enable the interfaces that the board uses on your Raspberry Pi.
|
||||
|
||||
The 640 board is controlled using the I2C interface. Any expansion boards attached to your 640 board are controlled using the SPI interface.
|
||||
|
||||
### Enable I2C and SPI in Pixel
|
||||
## Enable I2C and SPI in Pixel
|
||||
|
||||
If you are using the graphical interface on your Raspberry Pi then click on your main menu icon, move down to *Preferences* and click on the *Raspberry Pi Configuration* menu item. Once open click on the *Interfaces* tab and you should see something like in the image below.
|
||||
|
||||
@@ -124,7 +124,7 @@ If you have an expansion board then you'll need to enable the SPI interface as w
|
||||
|
||||
Once you click Ok you may be promtped to reboot your Raspberry Pi - go ahead and reboot.
|
||||
|
||||
### Enable I2C and SPI on the command line
|
||||
## Enable I2C and SPI on the command line
|
||||
|
||||
If you are only using the command line on your Raspberry Pi then you will need to use the text version of the Raspberry Pi configuration tool to enable the interfaces.
|
||||
|
||||
@@ -150,9 +150,9 @@ This time when you are returned to the main menu, move down to the *Finish* opti
|
||||
|
||||
You have now enabled the interfaces you need to use your board.
|
||||
|
||||
## Programming the 640
|
||||
# Programming the 640
|
||||
|
||||
### Installing the Python libraries
|
||||
## Installing the Python libraries
|
||||
|
||||
The Python libraries for the 640 board and some example scripts are available via our GitHub repository. To install them open a terminal window on your Raspberry Pi (unless you are running with only the command line) and enter the following:
|
||||
|
||||
@@ -172,7 +172,7 @@ And once in there we can install the libraries with:
|
||||
$ sudo python setup.py install
|
||||
```
|
||||
|
||||
#### Example scripts
|
||||
### Example scripts
|
||||
|
||||
Once everything is installed we can have a play with the example scripts included in the download. As well as being useful to test each part of your board, they are also handy as a starting point when writing your own scrips.
|
||||
|
||||
@@ -188,7 +188,7 @@ If you list the files in this directory, you should see a few test scripts
|
||||
$ ls -al
|
||||
```
|
||||
|
||||
##### 640motortest.py
|
||||
#### 640motortest.py
|
||||
|
||||
This script will start each motor port, in the forwards direction, in turn from left to right and then do the same backwards. To run the script enter the following:
|
||||
|
||||
@@ -196,7 +196,7 @@ This script will start each motor port, in the forwards direction, in turn from
|
||||
$ python 640motortest.py
|
||||
```
|
||||
|
||||
##### 640servotest.py
|
||||
#### 640servotest.py
|
||||
|
||||
This script will move any servos connected to the servo headers left, then center, then right. To run the script enter the following:
|
||||
|
||||
@@ -204,7 +204,7 @@ This script will move any servos connected to the servo headers left, then cente
|
||||
$ python 640servotest.py
|
||||
```
|
||||
|
||||
##### 640steppertest.py
|
||||
#### 640steppertest.py
|
||||
|
||||
This script divides the 6 motor ports into 3 stepper motor ports. Motor 1 and 2 will be stepper 1, motor 3 and 4 will be stepper 2 and motor 5 and 6 will be stepper 3.
|
||||
|
||||
@@ -214,7 +214,7 @@ Each stepper will be moved forwards and backwards through 400 steps when the tes
|
||||
$ python 640steppertest.py
|
||||
```
|
||||
|
||||
### The Python API
|
||||
## The Python API
|
||||
|
||||
Now you know everything works, it's time to write your own scripts. So create a new python script in your editor with a memorable name and add the following lines to import our libraries:
|
||||
|
||||
@@ -223,7 +223,7 @@ import time
|
||||
from darkwater_640 import dw_Controller, dw_Motor, dw_Servo, dw_Stepper
|
||||
```
|
||||
|
||||
#### Create a controller
|
||||
### Create a controller
|
||||
|
||||
The **dw_controller** object controls access to all the elements on the 640 board, so the first thing we need to do is create a controller - we pass in the address of the 640 board as a parameter - the default address is 0x60
|
||||
|
||||
@@ -233,7 +233,7 @@ dw = dw_Controller( addr=0x60 )
|
||||
|
||||
Now that we have the controller created, we can access all the connectors on the board.
|
||||
|
||||
#### Select a Motor
|
||||
### Select a Motor
|
||||
|
||||
There are 6 motor ports on the 640 board numbered 1 to 6 from left to right (with the ports facing you ).
|
||||
|
||||
@@ -243,13 +243,13 @@ If we want to control a motor on port number 1 then we need to request the motor
|
||||
m1 = dw.getMotor(1)
|
||||
```
|
||||
|
||||
#### Motor driving
|
||||
### Motor driving
|
||||
|
||||
There are two main commands that you can give a motor - to move in a direction and to stop.
|
||||
|
||||
We'll start with the main command to stop the motor
|
||||
|
||||
##### off()
|
||||
#### off()
|
||||
|
||||
The off command will switch off the motor and apply the brakes
|
||||
|
||||
@@ -257,7 +257,7 @@ The off command will switch off the motor and apply the brakes
|
||||
m1.off()
|
||||
```
|
||||
|
||||
##### setMotorSpeed( *speed* )
|
||||
#### setMotorSpeed( *speed* )
|
||||
|
||||
We can also stop the motor by using the second command and passing a speed of 0
|
||||
|
||||
@@ -295,7 +295,7 @@ And for a slow speed backwards we can use
|
||||
m1.setMotorSpeed(-50)
|
||||
```
|
||||
|
||||
##### Alternate speed range
|
||||
#### Alternate speed range
|
||||
|
||||
If you plan to move from a DC driven robot to an ESC motor powered robot then it makes sense to use the same conventions that will work on both, so you can also use the 1000 to 2000 speed range with the 640 board
|
||||
|
||||
@@ -329,7 +329,7 @@ and half speed in revers would be 1250
|
||||
m1.setMotorSpeed(1250)
|
||||
```
|
||||
|
||||
#### Select a Servo
|
||||
### Select a Servo
|
||||
|
||||
There are two servo ports on the 640 board. They are numbered 1 and 2 with number 1 to the left hand side and number 2 the closest to the motor ports.
|
||||
|
||||
@@ -339,11 +339,11 @@ You select a servo in the same manner as you select motors, by requesting a serv
|
||||
s1 = dw.getServo(1)
|
||||
```
|
||||
|
||||
#### Servo control
|
||||
### Servo control
|
||||
|
||||
Once you have a servo object there are currently three commands you can run.
|
||||
|
||||
##### off()
|
||||
#### off()
|
||||
|
||||
The off command will switch off your servo and stop any signals being sent to it.
|
||||
|
||||
@@ -351,7 +351,7 @@ The off command will switch off your servo and stop any signals being sent to it
|
||||
s1.off()
|
||||
```
|
||||
|
||||
##### setPWMuS( *microseconds* )
|
||||
#### setPWMuS( *microseconds* )
|
||||
|
||||
This command will allow you to set the PWM pulse to the Servo in microseconds.
|
||||
|
||||
@@ -363,7 +363,7 @@ s1.setPWMuS(2000) # fully clockwise
|
||||
s1.setPWMuS(1000) # fully counter clockwise
|
||||
```
|
||||
|
||||
##### setPWMmS( *milliseconds* )
|
||||
#### setPWMmS( *milliseconds* )
|
||||
|
||||
This command allows you to specify the PWM pulse in milliseconds rather than seconds.
|
||||
|
||||
@@ -373,7 +373,7 @@ s1.setPWMmS(2.0) # fully clockwise
|
||||
s1.setPWMmS(1.0) # fully counter clockwise
|
||||
```
|
||||
|
||||
#### Select a Stepper motor
|
||||
### Select a Stepper motor
|
||||
|
||||
You can control up to 3 stepper motors with the 640 board - each stepper motor uses two motor ports for 4 wire stepper motors and three motor ports for 5 wire stepper motors.
|
||||
|
||||
@@ -395,11 +395,11 @@ Once you have your stepper motor wired up you need to request the relevant stepp
|
||||
stepper1 = dw.getStepper(1)
|
||||
```
|
||||
|
||||
#### Stepper motor control
|
||||
### Stepper motor control
|
||||
|
||||
There are four commands for stepper motors. The first one you'll recognise
|
||||
|
||||
##### off()
|
||||
#### off()
|
||||
|
||||
The off command will switch off the stepper motor
|
||||
|
||||
@@ -407,7 +407,7 @@ The off command will switch off the stepper motor
|
||||
stepper1.off()
|
||||
```
|
||||
|
||||
##### setMotorSpeed( *rpm* )
|
||||
#### setMotorSpeed( *rpm* )
|
||||
|
||||
This command allows you to set the speed of your stepper motor. Pass the number of revolutions per minute that you want your stepper motor to run at.
|
||||
|
||||
@@ -415,7 +415,7 @@ This command allows you to set the speed of your stepper motor. Pass the number
|
||||
stepper1.setMotorSpeed(200)
|
||||
```
|
||||
|
||||
##### oneStep( *direction*, *style* )
|
||||
#### oneStep( *direction*, *style* )
|
||||
|
||||
This command will move the stepper motor one step in your chosen direction -
|
||||
|
||||
@@ -432,7 +432,7 @@ stepper1.oneStep(dw_Controller.FORWARD, dw_Controller.SINGLE)
|
||||
stepper1.oneStep(dw_Controller.REVERSE, dw_Controller.DOUBLE)
|
||||
```
|
||||
|
||||
##### step( *steps*, *direction*, *style* )
|
||||
#### step( *steps*, *direction*, *style* )
|
||||
|
||||
If you want to move the stepper motor a set number of steps then you can use this command. This, however, will stop all processing until the motor has moved the specified number of steps.
|
||||
|
||||
@@ -443,7 +443,7 @@ stepper1.step(200, dw_Controller.REVERSE, dw_Controller.DOUBLE)
|
||||
|
||||
If you want more control and need to move two or more motors at the same time then you should use the **oneStep** command.
|
||||
|
||||
### Installing the C++ libraries
|
||||
## Installing the C++ libraries
|
||||
|
||||
The C++ libraries for the 640 board and some example scripts are available via our GitHub repository. To install them open a terminal window on your Raspberry Pi (unless you are running with only the command line) and enter the following:
|
||||
|
||||
@@ -467,11 +467,11 @@ You should see two directories (and a README.md file which contains this content
|
||||
|
||||
The **darkwater** directory contains all of the classes needed to control your board and the **examples** directory contains a selection of demo code we've put together to show you how they are used.
|
||||
|
||||
#### Examples
|
||||
### Examples
|
||||
|
||||
Take a look in the examples directory and you will see the following available demos.
|
||||
|
||||
##### Motor
|
||||
#### Motor
|
||||
|
||||
The Motor example will start each motor in turn from 1 through to 6 in a forwards direction, then stop them and do the same in reverse. To build this demo type the following:
|
||||
|
||||
@@ -486,7 +486,7 @@ Once you are returned to the command prompt you can run the program with the com
|
||||
$ sudo ./Motor
|
||||
```
|
||||
|
||||
##### Servo
|
||||
#### Servo
|
||||
|
||||
The servo example will move each of the two servos on the 640 board backwards and forwards six times. To build this demo type the following:
|
||||
|
||||
@@ -501,7 +501,7 @@ Once it is compiled you can run it with the command:
|
||||
$ sudo ./Servo
|
||||
```
|
||||
|
||||
##### PPM
|
||||
#### PPM
|
||||
|
||||
The PPM example will read the input from a PPM radio control receiver connected to the CPPM header on the 640 board, interpret the first 6 channels and move the corresponding motors.
|
||||
|
||||
@@ -518,7 +518,7 @@ Once compiled, attach your CPPM receiver to the CPPM connector (see here CPPM se
|
||||
$ sudo ./PPM
|
||||
```
|
||||
|
||||
##### AccelGyroMag
|
||||
#### AccelGyroMag
|
||||
|
||||
If you have a 9DoF expansion board on your 640 board or are using a SOAR board then this example will read and output the Gyroscope, Accelerometer and Compass readings.
|
||||
|
||||
@@ -530,7 +530,7 @@ $ make
|
||||
$ sudo ./AccelGyroMag
|
||||
```
|
||||
|
||||
### The C++ API
|
||||
## The C++ API
|
||||
|
||||
If you take a look at the code in each of the examples you should be able to get an idea of how the 640 board API works. We'll go into more detail of each of the available commands below.
|
||||
|
||||
@@ -559,7 +559,7 @@ int main()
|
||||
}
|
||||
```
|
||||
|
||||
#### Create a controller
|
||||
### Create a controller
|
||||
|
||||
The **DW640** object controls access to all the elements on the 640 board, so the first thing we need to do is create a controller - we pass in the address of the 640 board as a parameter - the default address is 0x60 so if you haven't changed the address then you can leave this out.
|
||||
|
||||
@@ -570,7 +570,7 @@ dw.initialize();
|
||||
|
||||
Now that we have the controller created, we can access all the connectors on the board.
|
||||
|
||||
#### Select a Motor
|
||||
### Select a Motor
|
||||
|
||||
There are 6 motor ports on the 640 board numbered 1 to 6 from left to right (with the ports facing you ).
|
||||
|
||||
@@ -580,7 +580,7 @@ If we want to control a motor on port number 1 then we need to request the motor
|
||||
DW_Motor *dw1 = dw.getMotor(1);
|
||||
```
|
||||
|
||||
#### Motor driving
|
||||
### Motor driving
|
||||
|
||||
There are two main commands that you can give a motor - to move in a direction and to stop.
|
||||
|
||||
@@ -594,7 +594,7 @@ The off command will switch off the motor
|
||||
dw1->off()
|
||||
```
|
||||
|
||||
##### setMotorSpeed( *speed* )
|
||||
#### setMotorSpeed( *speed* )
|
||||
|
||||
We can also stop the motor by using the second command and passing a speed of 0
|
||||
|
||||
@@ -632,7 +632,7 @@ And for a slow speed backwards we can use
|
||||
dw1->setMotorSpeed(-50)
|
||||
```
|
||||
|
||||
##### Alternate speed range
|
||||
#### Alternate speed range
|
||||
|
||||
The spped range above is easy to use as you can quickly see what speed is forwards, backwards and stopped. ESC powered motors use a different range that goes from 1000 to 2000, with 1500 (the middle point) being stop.
|
||||
|
||||
@@ -668,7 +668,7 @@ and half speed in reverse would be 1250
|
||||
dw1->setMotorSpeed(1250)
|
||||
```
|
||||
|
||||
#### Select a Servo
|
||||
### Select a Servo
|
||||
|
||||
There are two servo ports on the 640 board. They are numbered from 1 and 2 with number 1 to the left hand side and number 2 the closest to the motor connectors.
|
||||
|
||||
@@ -678,11 +678,11 @@ You select a servo in the same manner as you select motors, by requesting a serv
|
||||
DW_Servo *s1 = dw.getServo(1);
|
||||
```
|
||||
|
||||
#### Servo control
|
||||
### Servo control
|
||||
|
||||
Once you have a servo object there are currently three commands you can run.
|
||||
|
||||
##### off()
|
||||
#### off()
|
||||
|
||||
The off command will switch off your servo and stop any signals being sent to it.
|
||||
|
||||
@@ -690,7 +690,7 @@ The off command will switch off your servo and stop any signals being sent to it
|
||||
s1->off();
|
||||
```
|
||||
|
||||
##### setPWMuS( *microseconds* )
|
||||
#### setPWMuS( *microseconds* )
|
||||
|
||||
This command will allow you to set the PWM pulse to the Servo in microseconds.
|
||||
|
||||
@@ -702,7 +702,7 @@ s1->setPWMuS(2000); // fully clockwise
|
||||
s1->setPWMuS(1000); // fully counter clockwise
|
||||
```
|
||||
|
||||
##### setPWMmS( *milliseconds* )
|
||||
#### setPWMmS( *milliseconds* )
|
||||
|
||||
This command allows you to specify the PWM pulse in milliseconds rather than seconds.
|
||||
|
||||
@@ -712,7 +712,7 @@ s1->setPWMmS(2.0); // fully clockwise
|
||||
s1->setPWMmS(1.0); // fully counter clockwise
|
||||
```
|
||||
|
||||
#### Select a Stepper motor
|
||||
### Select a Stepper motor
|
||||
|
||||
You can control up to 3 stepper motors with the 640 board - each stepper motor uses two motor ports for 4 wire stepper motors and three motor ports for 5 wire stepper motors.
|
||||
|
||||
@@ -742,11 +742,11 @@ DW_Stepper *st1 = dw.getStepper(1, 48);
|
||||
|
||||
Change the *48* in the line above to the number of steps your stepper motor has per revolution.
|
||||
|
||||
#### Stepper motor control
|
||||
### Stepper motor control
|
||||
|
||||
There are four commands for stepper motors. The first one you'll recognise
|
||||
|
||||
##### off()
|
||||
#### off()
|
||||
|
||||
The off command will switch off the stepper motor
|
||||
|
||||
@@ -754,7 +754,7 @@ The off command will switch off the stepper motor
|
||||
st1->off();
|
||||
```
|
||||
|
||||
##### setMotorSpeed( *rpm* )
|
||||
#### setMotorSpeed( *rpm* )
|
||||
|
||||
This command allows you to set the speed of your stepper motor. Pass the number of revolutions per minute that you want your stepper motor to run at.
|
||||
|
||||
@@ -762,7 +762,7 @@ This command allows you to set the speed of your stepper motor. Pass the number
|
||||
st1->setMotorSpeed(200);
|
||||
```
|
||||
|
||||
##### oneStep( *direction*, *style* )
|
||||
#### oneStep( *direction*, *style* )
|
||||
|
||||
This command will move the stepper motor one step in your chosen direction -
|
||||
|
||||
@@ -779,7 +779,7 @@ st1->oneStep(DW_FORWARD, DW_SINGLE);
|
||||
st1->oneStep(DW_REVERSE, DW_DOUBLE);
|
||||
```
|
||||
|
||||
##### step( *steps*, *direction*, *style* )
|
||||
#### step( *steps*, *direction*, *style* )
|
||||
|
||||
If you want to move the stepper motor a set number of steps then you can use this command. This, however, will stop all processing until the motor has moved the specified number of steps.
|
||||
|
||||
@@ -790,7 +790,7 @@ st1->step( 400, DW_REVERSE, DW_DOUBLE );
|
||||
|
||||
If you want more control and need to move two or more motors at the same time then you should use the **oneStep** command.
|
||||
|
||||
### Compiling your code
|
||||
## Compiling your code
|
||||
|
||||
Unlike with Python, we need to take an extra step with C++ and compile our code so that it can be run on the Raspberry Pi.
|
||||
|
||||
|
||||
18
readme.md
18
readme.md
@@ -10,10 +10,10 @@ The 640 (Six for Zero) board is a DC and Stepper motor control board capable of
|
||||
|
||||

|
||||
|
||||
- [Getting started](/640gettingstarted.html) setting up your 640 board ready for use
|
||||
- [Wiring everything up](/640wiring.html) connecting your power, motors and servos
|
||||
- [Programming in Python](/640python.html) the Python API and how to use it
|
||||
- [Programming in C++](/640cplusplus.html) controlling the board in C++
|
||||
- [Getting started](/640.html#getting-started) setting up your 640 board ready for use
|
||||
- [Wiring everything up](/640.html) connecting your power, motors and servos
|
||||
- [Programming in Python](/640.html) the Python API and how to use it
|
||||
- [Programming in C++](/640.html) controlling the board in C++
|
||||
- [Set up RC Input]() reading input from your RC receiver
|
||||
- [Expanding](/expansionadding.html) adding extra expansion boards
|
||||
- [Get Advanced](/640advanced.html) more advanced things you can do
|
||||
@@ -26,10 +26,10 @@ The ESCAPE (ESC-cape) board was designed to provide a method of using brushless
|
||||
|
||||

|
||||
|
||||
- [Getting started](/escapegettingstarted.html) setting up your ESCAPE board ready for use
|
||||
- [Wiring everything up](/escapewiring.html) connecting your power, motors and servos
|
||||
- [Programming in Python](/escapepython.html) the Python API and how to use it
|
||||
- [Programming in C++](/escapecplusplus.html) controlling the board in C++
|
||||
- [Getting started](/escape.html) setting up your ESCAPE board ready for use
|
||||
- [Wiring everything up](/escape.html) connecting your power, motors and servos
|
||||
- [Programming in Python](/escape.html) the Python API and how to use it
|
||||
- [Programming in C++](/escape.html) controlling the board in C++
|
||||
- [Set up RC Input]() reading input from your RC receiver
|
||||
- [Expanding](/expansionadding.html) adding extra expansion boards
|
||||
- [Get Advanced](/escapeadvanced.html) more advanced things you can do
|
||||
@@ -42,7 +42,7 @@ The SOAR board is a holder for advanced sensors. It is ideal for use with differ
|
||||
|
||||

|
||||
|
||||
- [Getting started](/soargettingstarted.html) setting up your SOAR board ready for use
|
||||
- [Getting started](/soar.html) setting up your SOAR board ready for use
|
||||
- [Adding an expansion board](/expansionadding.html) adding an expansion board
|
||||
- [Reading data]() reading the sensor data
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src='/flatdoc/flatdoc.js'></script>
|
||||
|
||||
<!-- Flatdoc theme -->
|
||||
<link href='/flatdoc/theme-dark/style.css?2' rel='stylesheet'>
|
||||
<link href='/flatdoc/theme-dark/style.css?3' rel='stylesheet'>
|
||||
<script src='/flatdoc/theme-dark/script.js?1'></script>
|
||||
|
||||
<!-- Highlight.js -->
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href='/640.html'>640</a></li>
|
||||
<li><a href='/escape.html'>ESCAPE</a></li>
|
||||
<!--<li><a href='/soar.html'>Soar</a></li>-->
|
||||
<li><a href='/expansions.html'>Expansions</a></li>
|
||||
<li><a href='/expansionadding.html'>Expansions</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
85
soar.md
85
soar.md
@@ -1,38 +1,69 @@
|
||||
# Introduction
|
||||
# Getting started
|
||||
|
||||
The Soar board holds a 9 Degrees of Freedom IMU chip and a Barometer.
|
||||

|
||||
|
||||
## Getting started
|
||||
## Board layout
|
||||
## Setup
|
||||
Welcome to the SOAR board - this is a very simple board designed to hold our small expansion sensors.
|
||||
|
||||
# Programming the Soar
|
||||
Whilst you may decide to connect an expansion sensor directly to your control board - if you think that you may change motor drivers at some point, then this board gives you the option of keeping your sensors separate.
|
||||
|
||||
## Python
|
||||
## Setup your SOAR
|
||||
|
||||
### Introduction
|
||||
### Import libraries
|
||||
### Reading the Compass
|
||||
### Reading the Magnetometer
|
||||
### Reading the Gyroscope
|
||||
### Reading the Barometer
|
||||
The first thing you should do is add the expansion sensor to your SOAR board - it is a lot easier to solder it on when the SOAR board is flat on your desk.
|
||||
|
||||
## Node.JS
|
||||

|
||||
|
||||
### Introduction
|
||||
### Import libraries
|
||||
### Reading the Compass
|
||||
### Reading the Magnetometer
|
||||
### Reading the Gyroscope
|
||||
### Reading the Barometer
|
||||
Our guide to adding the [expansion board is here](/expansionadding.html).
|
||||
|
||||
## C++
|
||||
### Attach the header
|
||||
|
||||
### Introduction
|
||||
### Install prerequisites
|
||||
### Reading the Compass
|
||||
### Reading the Magnetometer
|
||||
### Reading the Gyroscope
|
||||
### Reading the Barometer
|
||||
For this example we'll show you how to connect a stackable header, as it's the most complex.
|
||||
|
||||
Due to the length of the stackable headers pins, it can sometimes be a hassle to get them through the holes on the board.
|
||||
|
||||
We've found that if you slide up the spacer on the stackable header so that it is near the top, you can get the pins into the boards header holes a lot easier and then slide the spacer back down again.
|
||||
|
||||

|
||||
|
||||
Once you have your header in place, use some plasticine to make sure the board is level and then solder away. You should solder a single pin first, then make sure the header is level - if it isn't then apply the soldering iron to the pin again and move the header until it is correct.
|
||||
|
||||

|
||||
|
||||
*Note* - the image above shows the SOAR board ready for the header to be soldered **without** the expansion sensor attached - you can assemble the board in this order if you want (some people prefer it), but it's easier to add the expansion sensor first in our opinion.
|
||||
|
||||
Now that your board is set up, it's time to configure your Raspberry Pi so that you can use it.
|
||||
|
||||
## Setting up your Pi
|
||||
|
||||
Before we can start using the SOAR board we need to enable the interface that the board uses on your Raspberry Pi.
|
||||
|
||||
The SOAR board is controlled using the SPI interface.
|
||||
|
||||
### Enable SPI in Pixel
|
||||
|
||||
If you are using the graphical interface on your Raspberry Pi then click on your main menu icon, move down to *Preferences* and click on the *Raspberry Pi Configuration* menu item. Once open click on the *Interfaces* tab and you should see something like in the image below.
|
||||
|
||||

|
||||
|
||||
Make sure that the line labelled SPI is set to enabled.
|
||||
|
||||
Once you click Ok you may be promtped to reboot your Raspberry Pi - go ahead and reboot.
|
||||
|
||||
### Enable SPI on the command line
|
||||
|
||||
If you are only using the command line on your Raspberry Pi then you will need to use the text version of the Raspberry Pi configuration tool to enable the interfaces.
|
||||
|
||||
Type the following to bring up the configuration interface:
|
||||
|
||||
```bash
|
||||
$ sudo raspi-config
|
||||
```
|
||||
|
||||
Once the menu is showing, scroll down to the *Advanced Options* menu and press Enter.
|
||||
|
||||

|
||||
|
||||
Now we'll need to enable the SPI interface, so move down to the *SPI* menu and press Enter. You'll be asked if you want to enabled SPI - select *Yes* and you will see a confirmation and be returned to the main menu.
|
||||
|
||||
When you are returned to the main menu, move down to the *Finish* option (pressing the right arrow key twice will get you there) and press enter.
|
||||
|
||||
You have now enabled the interface you need to use your board.
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src='/flatdoc/flatdoc.js'></script>
|
||||
|
||||
<!-- Flatdoc theme -->
|
||||
<link href='/flatdoc/theme-dark/style.css?2' rel='stylesheet'>
|
||||
<link href='/flatdoc/theme-dark/style.css?3' rel='stylesheet'>
|
||||
<script src='/flatdoc/theme-dark/script.js?1'></script>
|
||||
<!-- Extra theme bits -->
|
||||
<link href='/flatdoc/support/theme.css' rel='stylesheet'>
|
||||
|
||||
Reference in New Issue
Block a user