[COPY&PASTE] This is the SoccerBoard ghost struct :D
More...
#include <eBoard.h>
[COPY&PASTE] This is the SoccerBoard ghost struct :D
- Author
- EagleoutIce
- Note
- Some calls like led-calls won't have any effect due to the hardware of the UNO
But they will work on the MEGA!
[COPY&PASTE] You can use this class like this:
#include "/home/eagleoutice/Dokumente/proj/_sia/src/eBoard.h"
bool toggle = true;
while(true){
toggle = !toggle;
}
}
Definition at line 2730 of file eBoard.h.
◆ SoccerBoard()
SoccerBoard::SoccerBoard |
( |
void |
| ) |
|
|
inline |
The constructor.
- Note
- Its important to mention the fact that there is nothing interesting about this ;D
◆ analog()
Reads an analog value from a pin.
- Parameters
-
- Returns
- returns the value read
◆ button()
void SoccerBoard::button |
( |
int |
| ) |
|
|
inline |
◆ digital()
bool SoccerBoard::digital |
( |
optVAL_t |
id | ) |
|
|
inline |
Reads a digital value from a pin.
- Parameters
-
- Returns
- returns the value read
◆ led()
void SoccerBoard::led |
( |
int |
idx, |
|
|
bool |
state |
|
) |
| |
|
inline |
[MEGA] Control the OnBoard LED
- Warning
- this will take control over the Di13 pin on the MEGA
- Parameters
-
idx | the index of the LED. Won't be checked always be assumed as 1 |
state | the state of the LED |
◆ ledMeter()
void SoccerBoard::ledMeter |
( |
int |
| ) |
|
|
inline |
[MEGA] Activate the OnBoard LED
- Warning
- this will take control over the Di13 pin on the MEGA
◆ ledOff()
void SoccerBoard::ledOff |
( |
int |
idx | ) |
|
|
inline |
[MEGA] Deactivate the OnBoard LED
- Warning
- this will take control over the Di13 pin on the MEGA
- Parameters
-
idx | the index of the LED. Won't be checked always be assumed as 1 |
◆ ledOn()
void SoccerBoard::ledOn |
( |
int |
idx | ) |
|
|
inline |
[MEGA] Activate the OnBoard LED
- Warning
- this will take control over the Di13 pin on the MEGA
- Parameters
-
idx | the index of the LED. Won't be checked always be assumed as 1 |
◆ ledsOff()
void SoccerBoard::ledsOff |
( |
void |
| ) |
|
|
inline |
[MEGA] Deactivate the OnBoard LED
- Warning
- this will take control over the Di13 pin on the MEGA
◆ motor()
void SoccerBoard::motor |
( |
uint8_t |
id, |
|
|
int16_t |
val |
|
) |
| |
|
inline |
As requested this is the ultimate shortcut ;)
- Parameters
-
id | set to
- 0 it will access the main Motor (accessed with I2CInOut otherwise)
- 1 it will try to access the Servo with the lower ID
- 2 it will try to access the Servo with the higher ID
|
val | the value you wan't to send
- if id = 0 : val has to be from -255 to 255. Dir will be decided by >0|<0
- if id = 1|2: val has to be from 0 to 1023
|
◆ motorsOff()
void SoccerBoard::motorsOff |
( |
void |
| ) |
|
|
inline |
As requested this is the shortcut to disable the main motor.
◆ msleep()
void SoccerBoard::msleep |
( |
uint16_t |
t | ) |
|
|
inline |
Say goodnight!
- Parameters
-
t | time in milliseconds the UNO gets to sleep ;) |
Referenced by main().
◆ power()
void SoccerBoard::power |
( |
optVAL_t |
id, |
|
|
bool |
state |
|
) |
| |
|
inline |
Set the state of a certain D-pin.
- Note
- unlike the soccerboard you can (if SHIFT_REGISTER enabled) use pinIDs from 100 to 131 (if provided by SN74HC595) directly to set shift-register Pins
-
if you want to have e.g. 64 bits you can hack the specific code (shiftAll()) to your needs;)
- Parameters
-
id | The id of the pin |
state | The state the pin should have |
◆ powerOff()
void SoccerBoard::powerOff |
( |
optVAL_t |
id | ) |
|
|
inline |
Set the state of a certain D-pin to LOW.
- Note
- unlike the soccerboard you can (if SHIFT_REGISTER enabled) use pinIDs from 100 to 131 (if provided by SN74HC595) directly to set shift-register Pins
-
if you want to have e.g. 64 bits you can hack the specific code (shiftAll()) to your needs;)
-
shortcut for power(id, LOW)
- Parameters
-
◆ powerOn()
void SoccerBoard::powerOn |
( |
optVAL_t |
id | ) |
|
|
inline |
Set the state of a certain D-pin to HIGH.
- Note
- unlike the soccerboard you can (if SHIFT_REGISTER enabled) use pinIDs from 100 to 131 (if provided by SN74HC595) directly to set shift-register Pins
-
if you want to have e.g. 64 bits you can hack the specific code (shiftAll()) to your needs;)
-
shortcut for power(id, HIGH)
- Parameters
-
◆ reset()
void SoccerBoard::reset |
( |
void |
| ) |
|
|
inline |
◆ sleep()
void SoccerBoard::sleep |
( |
uint16_t |
t | ) |
|
|
inline |
Say goodnight!
- Parameters
-
t | time in seconds the UNO gets to sleep ;) |
Referenced by eVirtual_main().
◆ waitForButton()
void SoccerBoard::waitForButton |
( |
int |
| ) |
|
|
inline |
The documentation for this struct was generated from the following file:
- /eagleoutice/projects/github/eBoard/eBoard.h