![]() |
eBoard 🐉
①⑧⑨
Written for SIA 2017/2018
|
#include <avr/pgmspace.h>
#include "Arduino.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <inttypes.h>
#include "Stream.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <avr/wdt.h>
#include <assert.h>
Go to the source code of this file.
Classes | |
class | eagle_impl::TwoWire |
This is used to avoid path resolving issues and defines the common known Arduino Wire-Interface Don't use manually More... | |
struct | eagle_impl::SPIClass |
[SPI] This is used to avoid path resolving issues and defines the common known Arduino SPI interface Don't use manually More... | |
class | eagle_impl::SoftwareSerial |
This is used to avoid path resolving issues and defines the common known Arduino SoftwareSerial interface only enabled on UNO and NANO (specific, ATmega328P based-plattforms) Don't use manually More... | |
struct | SoccerBoard |
[COPY&PASTE] This is the SoccerBoard ghost struct :D More... | |
struct | I2CInOut |
[COPY&PASTE] This is the I2CInOut ghost struct :D More... | |
struct | AX12Servo |
[COPY&PASTE] This is the AX12Servo ghost struct :D More... | |
struct | DynamixelBoard |
[COPY&PASTE] This is the DynamixelBoard ghost struct :D More... | |
struct | RB14Scan |
[COPY&PASTE] [BLUETOOTH] This is the RB14Scan ghost struct :D More... | |
struct | LCD |
[I2C] [LCD] This is used to add support for OLED displays connected to the 'SoccerBoard' More... | |
struct | NeoPixel |
[NEO] this allows you to access Adafruit LED-stripes More... | |
Namespaces | |
eagle_impl | |
this namespace contains all the Don't use manually classes ;) | |
Macros | |
#define | EBOARD_VERSION "3.1.5m" |
#define | EBOARD_VERSION_NBR 315 |
#define | PREPROCESS_DEBUG 1 |
#define | ARDUINO 200 |
#define | EBOARD_I2C 0x1 |
#define | EBOARD_LCD 0x1 |
#define | EBOARD_SHIFT_REGISTER 0x1 |
#define | EBOARD_BLUETOOTH 0x1 |
#define | REPT_TASK |
#define | __AVR_ATmega2560__ |
#define | __AVR_ATmega328P__ |
#define | EBOARD_NEO 0x1 |
#define | HIGHSPEED |
#define | __AVR__ |
ignore me ;) More... | |
#define | EBOARD_GUESSPATH 0x1 |
#define | main eVirtual_main |
#define | PIN_MAX 0x32 |
#define | BUFFER_LENGTH 32 |
#define | EBOARD_USE_SPI 0x1 |
#define | _SPI_H_INCLUDED |
#define | SPI_CLOCK_DIV4 0x00 |
#define | SPI_CLOCK_DIV16 0x01 |
#define | SPI_CLOCK_DIV64 0x02 |
#define | SPI_CLOCK_DIV128 0x03 |
#define | SPI_CLOCK_DIV2 0x04 |
#define | SPI_CLOCK_DIV8 0x05 |
#define | SPI_CLOCK_DIV32 0x06 |
#define | SPI_MODE0 0x00 |
#define | SPI_MODE1 0x04 |
#define | SPI_MODE2 0x08 |
#define | SPI_MODE3 0x0C |
#define | SPI_MODE_MASK 0x0C |
#define | SPI_CLOCK_MASK 0x03 |
#define | SPI_2XCLOCK_MASK 0x01 |
#define | EBOARD_DEBUG_MODE 0x1 |
#define | EBOARD_NANO 0x0 |
#define | EBOARD_NANO_STEER 12 |
#define | EBOARD_NANO_MAIN 13 |
#define | EBOARD_CHECK_PINS 0x1 |
#define | EBOARD_CHECK_PINS_PWM 0x1 |
#define | EBOARD_DEBUG_SPEED 9600 |
#define | EBOARD_SPI_SERVO_MAX 2 |
#define | EBOARD_USE_UTILITY 0x1 |
#define | EBOARD_COPY_AND_PASTE 0x1 |
#define | EBOARD_PWM_SPE 1 |
#define | EBOARD_CLAMP 0x1 |
#define | EBOARD_USE_RESET 0x1 |
#define | PIN_BLUETOOTH_STATE 0x13 |
#define | PIN_BLUETOOTH_RX 0x13 |
#define | PIN_BLUETOOTH_TX 0x12 |
#define | PIN_MOTOR_DIR 0x4 |
#define | PIN_MOTOR_SPE 0x5 |
#define | PIN_SHIFT_CLK 0x6 |
#define | PIN_SHIFT_DAT 0x7 |
#define | PIN_SHIFT_LAT 0x8 |
#define | SoftwareSerial_h |
#define | _SS_MAX_RX_BUFF 64 |
#define | GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
#define | __ASSERT_USE_STDERR |
#define | DIGITAL_IN 0x0 |
#define | DIGITAL_IN_INV 0x1 |
#define | DIGITAL_IN_PULLUP 0x2 |
#define | DIGITAL_IN_PULLUP_INV 0x3 |
#define | DIGITAL_OUT 0x4 |
#define | DIGITAL_OUT_INV 0x5 |
#define | DIGITAL_OUT_LOW 0x6 |
#define | DIGITAL_OUT_HIGH 0x7 |
#define | ANALOG_IN_8_BIT 0x8 |
#define | ANALOG_IN_10_BIT 0x9 |
#define | ANALOG_IN_MEAN_8_BIT 0xA |
#define | ANALOG_IN_MEAN_10_BIT 0xB |
#define | COUNTER_8_BIT 0xC |
#define | COUNTER_16_BIT 0xD |
#define | COUNTER_RISE_8_BIT 0xE |
#define | COUNTER_RISE_16_BIT 0xF |
#define | PWM_SLOW 0x8 |
#define | PWM_FAST 0x9 |
#define | FREQ_LOW 0xA |
#define | FREQ_HIGH 0xB |
#define | COUNTER_B_DIR 0xC |
#define | COUNTER_B_DIR_PULLUP 0xD |
#define | COUNTER_MEAN_8_BIT 0xE |
#define | COUNTER_MEAN_16_BIT 0xF |
#define | LCD_COMMAND_MODE 0x80 |
#define | LCD_DATA_MODE 0x40 |
#define | LCD_COMMAND_DISPLAY_OFF 0xAE |
#define | LCD_COMMAND_DISPLAY_ON 0xAF |
#define | LCD_COMMAND_BLACK_BACKGROUND 0xA6 |
#define | LCD_COMMAND_WHITE_BACKGROUND 0xA7 |
#define | LCD_COMMAND_SET_BRIGHTNESS 0x81 |
#define | LCD_PAGE_ADDRESSING 0x02 |
#define | LCD_HORIZONTAL_ADDRESSING 0x00 |
#define | LCD_COMMAND_CHARGE_PUMP_SETTING 0x8d |
#define | LCD_COMMAND_CHARGE_PUMP_ENABLE 0x14 |
#define | LCD_WIDTH 128 |
#define | LCD_HEIGHT 64 |
#define | EBOARD_NEO_RGB ((0 << 6) | (0 << 4) | (1 << 2) | (2)) |
#define | EBOARD_NEO_RBG ((0 << 6) | (0 << 4) | (2 << 2) | (1)) |
#define | EBOARD_NEO_GRB ((1 << 6) | (1 << 4) | (0 << 2) | (2)) |
#define | EBOARD_NEO_GBR ((2 << 6) | (2 << 4) | (0 << 2) | (1)) |
#define | EBOARD_NEO_BRG ((1 << 6) | (1 << 4) | (2 << 2) | (0)) |
#define | EBOARD_NEO_BGR ((2 << 6) | (2 << 4) | (1 << 2) | (0)) |
#define | EBOARD_NEO_WRGB ((0 << 6) | (1 << 4) | (2 << 2) | (3)) |
#define | EBOARD_NEO_WRBG ((0 << 6) | (1 << 4) | (3 << 2) | (2)) |
#define | EBOARD_NEO_WGRB ((0 << 6) | (2 << 4) | (1 << 2) | (3)) |
#define | EBOARD_NEO_WGBR ((0 << 6) | (3 << 4) | (1 << 2) | (2)) |
#define | EBOARD_NEO_WBRG ((0 << 6) | (2 << 4) | (3 << 2) | (1)) |
#define | EBOARD_NEO_WBGR ((0 << 6) | (3 << 4) | (2 << 2) | (1)) |
#define | EBOARD_NEO_RWGB ((1 << 6) | (0 << 4) | (2 << 2) | (3)) |
#define | EBOARD_NEO_RWBG ((1 << 6) | (0 << 4) | (3 << 2) | (2)) |
#define | EBOARD_NEO_RGWB ((2 << 6) | (0 << 4) | (1 << 2) | (3)) |
#define | EBOARD_NEO_RGBW ((3 << 6) | (0 << 4) | (1 << 2) | (2)) |
#define | EBOARD_NEO_RBWG ((2 << 6) | (0 << 4) | (3 << 2) | (1)) |
#define | EBOARD_NEO_RBGW ((3 << 6) | (0 << 4) | (2 << 2) | (1)) |
#define | EBOARD_NEO_GWRB ((1 << 6) | (2 << 4) | (0 << 2) | (3)) |
#define | EBOARD_NEO_GWBR ((1 << 6) | (3 << 4) | (0 << 2) | (2)) |
#define | EBOARD_NEO_GRWB ((2 << 6) | (1 << 4) | (0 << 2) | (3)) |
#define | EBOARD_NEO_GRBW ((3 << 6) | (1 << 4) | (0 << 2) | (2)) |
#define | EBOARD_NEO_GBWR ((2 << 6) | (3 << 4) | (0 << 2) | (1)) |
#define | EBOARD_NEO_GBRW ((3 << 6) | (2 << 4) | (0 << 2) | (1)) |
#define | EBOARD_NEO_BWRG ((1 << 6) | (2 << 4) | (3 << 2) | (0)) |
#define | EBOARD_NEO_BWGR ((1 << 6) | (3 << 4) | (2 << 2) | (0)) |
#define | EBOARD_NEO_BRWG ((2 << 6) | (1 << 4) | (3 << 2) | (0)) |
#define | EBOARD_NEO_BRGW ((3 << 6) | (1 << 4) | (2 << 2) | (0)) |
#define | EBOARD_NEO_BGWR ((2 << 6) | (3 << 4) | (1 << 2) | (0)) |
#define | EBOARD_NEO_BGRW ((3 << 6) | (2 << 4) | (1 << 2) | (0)) |
#define | EBOARD_NEO_800KHZ 0x0000 |
#define | EBOARD_NEO_400KHZ 0x0100 |
Typedefs | |
typedef int | optVAL_t |
Functions | |
int | sine8 (uint8_t val) |
will return the mapped 8-bit sin you can use in e.g. NeoPixel More... | |
int | gamma8 (uint8_t val) |
will return the mapped 8-bit gamma correction you can use in e.g. NeoPixel More... | |
SoftwareSerial | _serial (0x13, 0x12) |
this is the recomenned-to-use _serial object for bluetooth communcation :D More... | |
void | __assert (const char *__func, const char *__file, optVAL_t __lineno, const char *__sexp) |
[DEBUG_MODE] custom assert message More... | |
void | checkIdx (optVAL_t idx) |
[DEBUG_MODE] used to check if a pin index is in bounds More... | |
optVAL_t | countSetBits (optVAL_t x) |
[COPY&PASTE] [CHECK_PWM] counts high-bits in an int/byte (determined by IGNORE_SIZE) More... | |
bool | checkPin (optVAL_t idx, optVAL_t mode=0x1) |
[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode More... | |
void | setPin (optVAL_t idx, optVAL_t mode=0x1) |
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then More... | |
char | readVal (char oF='.') |
[BLUETOOTH] reads a single value from bluetooth if available! More... | |
bool | checkOverflow (void) |
[BLUETOOTH] checks if theres a lack of Data! More... | |
template<typename T > | |
void | writeVal (const T &val) |
[BLUETOOTH] writes Data to bluetooth More... | |
bool | isConnected (void) |
[BLUETOOTH] this will check if the HC-05 is paired More... | |
void | shiftSingle (optVAL_t idx, bool val) |
[SHIFT] Changes a single output Pin More... | |
void | shiftAll (void) |
[SHIFT] Changes bits according to store_bits More... | |
void | writePWM (optVAL_t val) |
write a clamped pwm value to an output pin More... | |
void | writePin (optVAL_t idx, bool val) |
write a boolean state to an output pin More... | |
optVAL_t | readPin (optVAL_t idx, bool dig=true) |
read a digital state from an INPUTpin More... | |
optVAL_t | sendI2C (optVAL_t deviceID, byte *buf, byte buf_len) |
Sends a buffer of bytes to a certain I²C-Device. More... | |
optVAL_t | sendI2C (optVAL_t deviceID, byte buf) |
Sends a byte to a certain I2C-Device. More... | |
void | pingI2C (optVAL_t ret[], optVAL_t ret_len) |
Sends a byte to a certain I²C-Device. More... | |
void | readI2C (optVAL_t deviceID, optVAL_t ret[], optVAL_t ret_len, bool blocking=true) |
Reads a special amount of bits from a certain I²C-Device. More... | |
void | trig_rept_task () |
ISR (TIMER2_OVF_vect) | |
int | eVirtual_main () |
[COPY&PASTE] Assures the existence of the "qfix-code-main-method" More... | |
void | setup (void) |
[COPY&PASTE] As we have an Arduino we need a setup function ;) More... | |
void | loop (void) |
[COPY&PASTE] As we have an Arduino we need a setup function ;) More... | |
void | set_motor_speed (optVAL_t spe) |
sets the speed of the main (data pin: EBOARD_NANO_MAIN) motor More... | |
void | set_steer_angle (optVAL_t ang) |
sets the angle of the steering (data pin: EBOARD_NANO_STEER) motor More... | |
Variables | |
TwoWire | Wire = TwoWire() |
this is the well-known Arduino Wire Interface, just a little bit 'modified' ;P More... | |
SPIClass | SPI |
static bool | STOP = false |
uint64_t | pin_out = 0x0 |
uint64_t | pin_in = 0x0 |
long | store_bits = 0L |
[SHIFT] Manipulate me to set Pins via bitSet operations More... | |
optVAL_t | _pwmValue = 0x0 |
optVAL_t | _OpwmValue = 0x0 |
ServoCds55 | _servoHandler |
this is the "to_use" instance of ServoCds55 More... | |
PROGMEM const byte | basicFont [][8] |
int | timer_count = 0 |
bool | timer_ofl = false |
EagleoutIce 2018 IF YOU SEE THIS THIS IS THE UNPROCESSED FILE! GO TO 'SOURCE CODE' IN THE DOCS
Definition in file eBoard.h.
#define __ASSERT_USE_STDERR |
#define __AVR_ATmega2560__ |
#define __AVR_ATmega328P__ |
#define _SPI_H_INCLUDED |
#define ANALOG_IN_10_BIT 0x9 |
#define ANALOG_IN_8_BIT 0x8 |
#define ANALOG_IN_MEAN_10_BIT 0xB |
#define ANALOG_IN_MEAN_8_BIT 0xA |
#define COUNTER_16_BIT 0xD |
#define COUNTER_8_BIT 0xC |
#define COUNTER_B_DIR 0xC |
#define COUNTER_B_DIR_PULLUP 0xD |
#define COUNTER_MEAN_16_BIT 0xF |
#define COUNTER_MEAN_8_BIT 0xE |
#define COUNTER_RISE_16_BIT 0xF |
#define COUNTER_RISE_8_BIT 0xE |
#define DIGITAL_IN 0x0 |
#define DIGITAL_IN_INV 0x1 |
#define DIGITAL_IN_PULLUP 0x2 |
#define DIGITAL_IN_PULLUP_INV 0x3 |
#define DIGITAL_OUT 0x4 |
#define DIGITAL_OUT_HIGH 0x7 |
#define DIGITAL_OUT_INV 0x5 |
#define DIGITAL_OUT_LOW 0x6 |
#define EBOARD_BLUETOOTH 0x1 |
#define EBOARD_CHECK_PINS 0x1 |
#define EBOARD_CHECK_PINS_PWM 0x1 |
#define EBOARD_CLAMP 0x1 |
#define EBOARD_COPY_AND_PASTE 0x1 |
#define EBOARD_DEBUG_MODE 0x1 |
#define EBOARD_DEBUG_SPEED 9600 |
#define EBOARD_GUESSPATH 0x1 |
#define EBOARD_I2C 0x1 |
#define EBOARD_LCD 0x1 |
#define EBOARD_NANO 0x0 |
#define EBOARD_NANO_MAIN 13 |
#define EBOARD_NANO_STEER 12 |
#define EBOARD_NEO 0x1 |
#define EBOARD_NEO_400KHZ 0x0100 |
#define EBOARD_NEO_800KHZ 0x0000 |
#define EBOARD_NEO_BGR ((2 << 6) | (2 << 4) | (1 << 2) | (0)) |
#define EBOARD_NEO_BGRW ((3 << 6) | (2 << 4) | (1 << 2) | (0)) |
#define EBOARD_NEO_BGWR ((2 << 6) | (3 << 4) | (1 << 2) | (0)) |
#define EBOARD_NEO_BRG ((1 << 6) | (1 << 4) | (2 << 2) | (0)) |
#define EBOARD_NEO_BRGW ((3 << 6) | (1 << 4) | (2 << 2) | (0)) |
#define EBOARD_NEO_BRWG ((2 << 6) | (1 << 4) | (3 << 2) | (0)) |
#define EBOARD_NEO_BWGR ((1 << 6) | (3 << 4) | (2 << 2) | (0)) |
#define EBOARD_NEO_BWRG ((1 << 6) | (2 << 4) | (3 << 2) | (0)) |
#define EBOARD_NEO_GBR ((2 << 6) | (2 << 4) | (0 << 2) | (1)) |
#define EBOARD_NEO_GBRW ((3 << 6) | (2 << 4) | (0 << 2) | (1)) |
#define EBOARD_NEO_GBWR ((2 << 6) | (3 << 4) | (0 << 2) | (1)) |
#define EBOARD_NEO_GRB ((1 << 6) | (1 << 4) | (0 << 2) | (2)) |
#define EBOARD_NEO_GRBW ((3 << 6) | (1 << 4) | (0 << 2) | (2)) |
#define EBOARD_NEO_GRWB ((2 << 6) | (1 << 4) | (0 << 2) | (3)) |
#define EBOARD_NEO_GWBR ((1 << 6) | (3 << 4) | (0 << 2) | (2)) |
#define EBOARD_NEO_GWRB ((1 << 6) | (2 << 4) | (0 << 2) | (3)) |
#define EBOARD_NEO_RBG ((0 << 6) | (0 << 4) | (2 << 2) | (1)) |
#define EBOARD_NEO_RBGW ((3 << 6) | (0 << 4) | (2 << 2) | (1)) |
#define EBOARD_NEO_RBWG ((2 << 6) | (0 << 4) | (3 << 2) | (1)) |
#define EBOARD_NEO_RGB ((0 << 6) | (0 << 4) | (1 << 2) | (2)) |
#define EBOARD_NEO_RGBW ((3 << 6) | (0 << 4) | (1 << 2) | (2)) |
#define EBOARD_NEO_RGWB ((2 << 6) | (0 << 4) | (1 << 2) | (3)) |
#define EBOARD_NEO_RWBG ((1 << 6) | (0 << 4) | (3 << 2) | (2)) |
#define EBOARD_NEO_RWGB ((1 << 6) | (0 << 4) | (2 << 2) | (3)) |
#define EBOARD_NEO_WBGR ((0 << 6) | (3 << 4) | (2 << 2) | (1)) |
#define EBOARD_NEO_WBRG ((0 << 6) | (2 << 4) | (3 << 2) | (1)) |
#define EBOARD_NEO_WGBR ((0 << 6) | (3 << 4) | (1 << 2) | (2)) |
#define EBOARD_NEO_WGRB ((0 << 6) | (2 << 4) | (1 << 2) | (3)) |
#define EBOARD_NEO_WRBG ((0 << 6) | (1 << 4) | (3 << 2) | (2)) |
#define EBOARD_NEO_WRGB ((0 << 6) | (1 << 4) | (2 << 2) | (3)) |
#define EBOARD_PWM_SPE 1 |
Definition at line 1591 of file eBoard.h.
Referenced by ISR().
#define EBOARD_SHIFT_REGISTER 0x1 |
#define EBOARD_SPI_SERVO_MAX 2 |
#define EBOARD_USE_RESET 0x1 |
#define EBOARD_USE_SPI 0x1 |
#define EBOARD_USE_UTILITY 0x1 |
#define EBOARD_VERSION "3.1.5m" |
#define EBOARD_VERSION_NBR 315 |
#define FREQ_HIGH 0xB |
#define FREQ_LOW 0xA |
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
#define HIGHSPEED |
#define LCD_COMMAND_BLACK_BACKGROUND 0xA6 |
#define LCD_COMMAND_CHARGE_PUMP_ENABLE 0x14 |
#define LCD_COMMAND_CHARGE_PUMP_SETTING 0x8d |
#define LCD_COMMAND_DISPLAY_OFF 0xAE |
#define LCD_COMMAND_DISPLAY_ON 0xAF |
#define LCD_COMMAND_MODE 0x80 |
#define LCD_COMMAND_SET_BRIGHTNESS 0x81 |
#define LCD_COMMAND_WHITE_BACKGROUND 0xA7 |
#define LCD_DATA_MODE 0x40 |
#define LCD_HEIGHT 64 |
#define LCD_HORIZONTAL_ADDRESSING 0x00 |
#define LCD_PAGE_ADDRESSING 0x02 |
#define LCD_WIDTH 128 |
#define main eVirtual_main |
#define PIN_BLUETOOTH_RX 0x13 |
#define PIN_BLUETOOTH_STATE 0x13 |
#define PIN_BLUETOOTH_TX 0x12 |
#define PIN_MAX 0x32 |
#define PIN_MOTOR_DIR 0x4 |
#define PIN_MOTOR_SPE 0x5 |
Definition at line 1699 of file eBoard.h.
Referenced by trig_rept_task().
#define PIN_SHIFT_CLK 0x6 |
#define PIN_SHIFT_DAT 0x7 |
#define PIN_SHIFT_LAT 0x8 |
#define PREPROCESS_DEBUG 1 |
#define PWM_FAST 0x9 |
#define PWM_SLOW 0x8 |
#define REPT_TASK |
#define SPI_2XCLOCK_MASK 0x01 |
#define SPI_CLOCK_DIV128 0x03 |
#define SPI_CLOCK_DIV16 0x01 |
#define SPI_CLOCK_DIV2 0x04 |
#define SPI_CLOCK_DIV32 0x06 |
#define SPI_CLOCK_DIV4 0x00 |
#define SPI_CLOCK_DIV64 0x02 |
#define SPI_CLOCK_DIV8 0x05 |
#define SPI_CLOCK_MASK 0x03 |
#define SPI_MODE0 0x00 |
#define SPI_MODE1 0x04 |
#define SPI_MODE2 0x08 |
#define SPI_MODE3 0x0C |
#define SPI_MODE_MASK 0x0C |
void __assert | ( | const char * | __func, |
const char * | __file, | ||
optVAL_t | __lineno, | ||
const char * | __sexp | ||
) |
[DEBUG_MODE] custom assert message
__func | the function name |
__file | the file name |
__lineno | the line number |
__sexp | the expression |
Error with: checkIdx in /home/eagleoutice/Dokumente/proj/_sia/src/eBoard.h >>idx>0x1 && idx < 0xA This happens if an out of bounds exception has occured. Following pins shouldn't be used: D2&D3 : Used for Bluetooth communication D4&D5 : Used for main motor control D10-13: Used for smart-servo-shield
SoftwareSerial _serial | ( | 0x13 | , |
0x12 | |||
) |
this is the recomenned-to-use _serial object for bluetooth communcation :D
The used pins are based on PIN_BLUETOOTH_RX and PIN_BLUETOOTH_TX
|
inline |
[DEBUG_MODE] used to check if a pin index is in bounds
idx | the index of the pin to check |
|
inline |
[BLUETOOTH] checks if theres a lack of Data!
[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode
idx | the index of the pin to check |
mode | the mode the pin should be checked for |
🔧 I prevent errors!
[COPY&PASTE] [CHECK_PWM] counts high-bits in an int/byte (determined by IGNORE_SIZE)
x | the number to check |
int eVirtual_main | ( | ) |
[COPY&PASTE] Assures the existence of the "qfix-code-main-method"
|
inline |
|
inline |
[BLUETOOTH] this will check if the HC-05 is paired
ISR | ( | TIMER2_OVF_vect | ) |
Definition at line 6439 of file eBoard.h.
References EBOARD_PWM_SPE, timer_count, timer_ofl, and trig_rept_task().
void loop | ( | void | ) |
[COPY&PASTE] As we have an Arduino we need a setup function ;)
Sends a byte to a certain I²C-Device.
ret | an array of optVAL_t |
ret_len | the length of the array |
Reads a special amount of bits from a certain I²C-Device.
deviceID | the target device |
ret | the buffer to send |
ret_len | size of buffer |
blocking | should the Arduino wait until there is Data? |
read a digital state from an INPUTpin
idx | the index of the pin to use |
dig | determines if the value should be from the digital or the analog pins |
|
inline |
[BLUETOOTH] reads a single value from bluetooth if available!
oF | the character returned on failure |
Sends a buffer of bytes to a certain I²C-Device.
deviceID | the target device |
buf | the buffer to send |
buf_len | size of buffer |
Sends a byte to a certain I2C-Device.
deviceID | the target device |
buf | the buffer to send |
|
inline |
sets the speed of the main (data pin: EBOARD_NANO_MAIN) motor
spe | the speed of the Motor [0;180] 90 means stop |
|
inline |
sets the angle of the steering (data pin: EBOARD_NANO_STEER) motor
ang | the angle of the motor should drive to [0;180] |
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then
idx | the index of the pin to set |
mode | the mode the pin should be set to |
void setup | ( | void | ) |
[COPY&PASTE] As we have an Arduino we need a setup function ;)
void shiftAll | ( | void | ) |
[SHIFT] Changes bits according to store_bits
|
inline |
[SHIFT] Changes a single output Pin
idx | index of the bit :D |
val | the new state of this bit |
|
inline |
void trig_rept_task | ( | ) |
Definition at line 6425 of file eBoard.h.
References _OpwmValue, _pwmValue, and PIN_MOTOR_SPE.
Referenced by ISR().
|
inline |
write a boolean state to an output pin
idx | the index of the pin to use |
val | the state the pin should have |
|
inline |
write a clamped pwm value to an output pin
val | the pwm value [0-255] to use |
|
inline |
[BLUETOOTH] writes Data to bluetooth
val | This is the data to be written. Can be int, str etc... |
optVAL_t _OpwmValue = 0x0 |
Definition at line 2579 of file eBoard.h.
Referenced by trig_rept_task().
optVAL_t _pwmValue = 0x0 |
Definition at line 2579 of file eBoard.h.
Referenced by trig_rept_task().
ServoCds55 _servoHandler |
uint64_t pin_in = 0x0 |
uint64_t pin_out = 0x0 |
|
static |
long store_bits = 0L |