eBoard 🐉  ①⑧⑨
Written for SIA 2017/2018
eBoard.h File Reference
#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>
+ Include dependency graph for eBoard.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.1m"
 
#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 _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)
 this is a guard 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
 

Detailed Description

EagleoutIce 2018 IF YOU SEE THIS THIS IS THE UNPROCESSED FILE! GO TO 'SOURCE CODE' IN THE DOCS

Definition in file eBoard.h.

Macro Definition Documentation

◆ __ASSERT_USE_STDERR

#define __ASSERT_USE_STDERR
Macro or Constant :
[DEBUG_MODE] enables to use custom assert output

Definition at line 2318 of file eBoard.h.

◆ __AVR__

#define __AVR__

ignore me ;)

Definition at line 555 of file eBoard.h.

◆ __AVR_ATmega2560__

#define __AVR_ATmega2560__
Macro or Constant :
This is the Macro that will be defined automatically by the ARUDINO IDE if you compile this program for an ARDUINO MEGA 2560

Definition at line 538 of file eBoard.h.

◆ __AVR_ATmega328P__

#define __AVR_ATmega328P__
Macro or Constant :
This is the Macro that will be defined automatically by the ARUDINO IDE if you compile this program for an ARDUINO UNO R3

Definition at line 542 of file eBoard.h.

◆ _SPI_H_INCLUDED

#define _SPI_H_INCLUDED
Macro or Constant :
the header macro to assure that there is a SPIClass available

Definition at line 1310 of file eBoard.h.

◆ _SS_MAX_RX_BUFF

#define _SS_MAX_RX_BUFF   64

Definition at line 1727 of file eBoard.h.

◆ ANALOG_IN_10_BIT

#define ANALOG_IN_10_BIT   0x9
Macro or Constant :
I2CInOut servant

Definition at line 3005 of file eBoard.h.

◆ ANALOG_IN_8_BIT

#define ANALOG_IN_8_BIT   0x8
Macro or Constant :
I2CInOut servant

Definition at line 3003 of file eBoard.h.

◆ ANALOG_IN_MEAN_10_BIT

#define ANALOG_IN_MEAN_10_BIT   0xB
Macro or Constant :
I2CInOut servant

Definition at line 3009 of file eBoard.h.

◆ ANALOG_IN_MEAN_8_BIT

#define ANALOG_IN_MEAN_8_BIT   0xA
Macro or Constant :
I2CInOut servant

Definition at line 3007 of file eBoard.h.

◆ ARDUINO

#define ARDUINO   200

Definition at line 513 of file eBoard.h.

◆ BUFFER_LENGTH

#define BUFFER_LENGTH   32

Definition at line 925 of file eBoard.h.

◆ COUNTER_16_BIT

#define COUNTER_16_BIT   0xD
Macro or Constant :
I2CInOut servant

Definition at line 3013 of file eBoard.h.

◆ COUNTER_8_BIT

#define COUNTER_8_BIT   0xC
Macro or Constant :
I2CInOut servant

Definition at line 3011 of file eBoard.h.

◆ COUNTER_B_DIR

#define COUNTER_B_DIR   0xC
Macro or Constant :
I2CInOut servant

Definition at line 3027 of file eBoard.h.

◆ COUNTER_B_DIR_PULLUP

#define COUNTER_B_DIR_PULLUP   0xD
Macro or Constant :
I2CInOut servant

Definition at line 3029 of file eBoard.h.

◆ COUNTER_MEAN_16_BIT

#define COUNTER_MEAN_16_BIT   0xF
Macro or Constant :
I2CInOut servant

Definition at line 3033 of file eBoard.h.

◆ COUNTER_MEAN_8_BIT

#define COUNTER_MEAN_8_BIT   0xE
Macro or Constant :
I2CInOut servant

Definition at line 3031 of file eBoard.h.

◆ COUNTER_RISE_16_BIT

#define COUNTER_RISE_16_BIT   0xF
Macro or Constant :
I2CInOut servant

Definition at line 3017 of file eBoard.h.

◆ COUNTER_RISE_8_BIT

#define COUNTER_RISE_8_BIT   0xE
Macro or Constant :
I2CInOut servant

Definition at line 3015 of file eBoard.h.

◆ DIGITAL_IN

#define DIGITAL_IN   0x0
Macro or Constant :
I2CInOut servant

Definition at line 2987 of file eBoard.h.

◆ DIGITAL_IN_INV

#define DIGITAL_IN_INV   0x1
Macro or Constant :
I2CInOut servant

Definition at line 2989 of file eBoard.h.

◆ DIGITAL_IN_PULLUP

#define DIGITAL_IN_PULLUP   0x2
Macro or Constant :
I2CInOut servant

Definition at line 2991 of file eBoard.h.

◆ DIGITAL_IN_PULLUP_INV

#define DIGITAL_IN_PULLUP_INV   0x3
Macro or Constant :
I2CInOut servant

Definition at line 2993 of file eBoard.h.

◆ DIGITAL_OUT

#define DIGITAL_OUT   0x4
Macro or Constant :
I2CInOut servant

Definition at line 2995 of file eBoard.h.

◆ DIGITAL_OUT_HIGH

#define DIGITAL_OUT_HIGH   0x7
Macro or Constant :
I2CInOut servant

Definition at line 3001 of file eBoard.h.

◆ DIGITAL_OUT_INV

#define DIGITAL_OUT_INV   0x5
Macro or Constant :
I2CInOut servant

Definition at line 2997 of file eBoard.h.

◆ DIGITAL_OUT_LOW

#define DIGITAL_OUT_LOW   0x6
Macro or Constant :
I2CInOut servant

Definition at line 2999 of file eBoard.h.

◆ EBOARD_BLUETOOTH

#define EBOARD_BLUETOOTH   0x1
Macro or Constant :
This will appear as 0x1 in the docs but the real default value is 0x0

Definition at line 530 of file eBoard.h.

◆ EBOARD_CHECK_PINS

#define EBOARD_CHECK_PINS   0x1
Macro or Constant :
this is a copy and paste guard to check if the pins used are still in Bound... it was designed for digital pins and shouldnt be disabled

Definition at line 1508 of file eBoard.h.

◆ EBOARD_CHECK_PINS_PWM

#define EBOARD_CHECK_PINS_PWM   0x1
Macro or Constant :
this should be disabled when reaching RELEASED-state. This will check if an PWM-controlled pin is really capable of HPWM ^^

Definition at line 1534 of file eBoard.h.

◆ EBOARD_CLAMP

#define EBOARD_CLAMP   0x1
Macro or Constant :
set this to 0x0 to disable clamp

Definition at line 1613 of file eBoard.h.

◆ EBOARD_COPY_AND_PASTE

#define EBOARD_COPY_AND_PASTE   0x1
Macro or Constant :
unable to disable

Definition at line 1578 of file eBoard.h.

◆ EBOARD_DEBUG_MODE

#define EBOARD_DEBUG_MODE   0x1
Macro or Constant :
you should definitly set EBOARD_DEBUG_MODE to 0x0 when completed developing. This will shrink the size of the program :D

Definition at line 1465 of file eBoard.h.

◆ EBOARD_DEBUG_SPEED

#define EBOARD_DEBUG_SPEED   9600
Macro or Constant :
this sets the speed of the Serial connection.... you probably don't need to change this

Definition at line 1547 of file eBoard.h.

◆ EBOARD_GUESSPATH

#define EBOARD_GUESSPATH   0x1
Macro or Constant :
If this is set to 0x1 the library will guess the paths of included libraries based on your operating system

Definition at line 587 of file eBoard.h.

◆ EBOARD_I2C

#define EBOARD_I2C   0x1
Macro or Constant :
This will appear as 0x1 in the docs but the real default value is 0x0

Definition at line 517 of file eBoard.h.

◆ EBOARD_LCD

#define EBOARD_LCD   0x1
Macro or Constant :
This will appear as 0x1 in the docs but the real default value is 0x0 This will enable the support for the OLED I²C 128x64 Monochrome display

Definition at line 522 of file eBoard.h.

◆ EBOARD_NANO

#define EBOARD_NANO   0x0
Macro or Constant :
this will disable soccerBoard class DynamixelBoard etc!

Definition at line 1479 of file eBoard.h.

◆ EBOARD_NANO_MAIN

#define EBOARD_NANO_MAIN   13
Macro or Constant :
Data pin of the main Motor

Definition at line 1493 of file eBoard.h.

◆ EBOARD_NANO_STEER

#define EBOARD_NANO_STEER   12
Macro or Constant :
Data pin of the steering Motor

Definition at line 1487 of file eBoard.h.

◆ EBOARD_NEO

#define EBOARD_NEO   0x1
Macro or Constant :
This will appear as 0x1 in the docs but the real default value is 0x0

Definition at line 546 of file eBoard.h.

◆ EBOARD_NEO_400KHZ

#define EBOARD_NEO_400KHZ   0x0100
Macro or Constant :
Defines the value to enable 400Khz communication Mode

Definition at line 4369 of file eBoard.h.

◆ EBOARD_NEO_800KHZ

#define EBOARD_NEO_800KHZ   0x0000
Macro or Constant :
Defines the value to enable 800Khz communication Mode

Definition at line 4367 of file eBoard.h.

◆ EBOARD_NEO_BGR

#define EBOARD_NEO_BGR   ((2 << 6) | (2 << 4) | (1 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BGR-Mode

Definition at line 4312 of file eBoard.h.

◆ EBOARD_NEO_BGRW

#define EBOARD_NEO_BGRW   ((3 << 6) | (2 << 4) | (1 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BGRW-Mode

Definition at line 4363 of file eBoard.h.

◆ EBOARD_NEO_BGWR

#define EBOARD_NEO_BGWR   ((2 << 6) | (3 << 4) | (1 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BGWR-Mode

Definition at line 4361 of file eBoard.h.

◆ EBOARD_NEO_BRG

#define EBOARD_NEO_BRG   ((1 << 6) | (1 << 4) | (2 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BRG-Mode

Definition at line 4310 of file eBoard.h.

◆ EBOARD_NEO_BRGW

#define EBOARD_NEO_BRGW   ((3 << 6) | (1 << 4) | (2 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BRGW-Mode

Definition at line 4359 of file eBoard.h.

◆ EBOARD_NEO_BRWG

#define EBOARD_NEO_BRWG   ((2 << 6) | (1 << 4) | (3 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BRWG-Mode

Definition at line 4357 of file eBoard.h.

◆ EBOARD_NEO_BWGR

#define EBOARD_NEO_BWGR   ((1 << 6) | (3 << 4) | (2 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BWGR-Mode

Definition at line 4355 of file eBoard.h.

◆ EBOARD_NEO_BWRG

#define EBOARD_NEO_BWRG   ((1 << 6) | (2 << 4) | (3 << 2) | (0))
Macro or Constant :
Defines the amount of needed permutation when com. in BWRG-Mode

Definition at line 4353 of file eBoard.h.

◆ EBOARD_NEO_GBR

#define EBOARD_NEO_GBR   ((2 << 6) | (2 << 4) | (0 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in GBR-Mode

Definition at line 4308 of file eBoard.h.

◆ EBOARD_NEO_GBRW

#define EBOARD_NEO_GBRW   ((3 << 6) | (2 << 4) | (0 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in GBRW-Mode

Definition at line 4351 of file eBoard.h.

◆ EBOARD_NEO_GBWR

#define EBOARD_NEO_GBWR   ((2 << 6) | (3 << 4) | (0 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in GBWR-Mode

Definition at line 4349 of file eBoard.h.

◆ EBOARD_NEO_GRB

#define EBOARD_NEO_GRB   ((1 << 6) | (1 << 4) | (0 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in GRB-Mode

Definition at line 4306 of file eBoard.h.

◆ EBOARD_NEO_GRBW

#define EBOARD_NEO_GRBW   ((3 << 6) | (1 << 4) | (0 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in GRBW-Mode

Definition at line 4347 of file eBoard.h.

◆ EBOARD_NEO_GRWB

#define EBOARD_NEO_GRWB   ((2 << 6) | (1 << 4) | (0 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in GRWB-Mode

Definition at line 4345 of file eBoard.h.

◆ EBOARD_NEO_GWBR

#define EBOARD_NEO_GWBR   ((1 << 6) | (3 << 4) | (0 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in GWBR-Mode

Definition at line 4343 of file eBoard.h.

◆ EBOARD_NEO_GWRB

#define EBOARD_NEO_GWRB   ((1 << 6) | (2 << 4) | (0 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in GWRB-Mode

Definition at line 4341 of file eBoard.h.

◆ EBOARD_NEO_RBG

#define EBOARD_NEO_RBG   ((0 << 6) | (0 << 4) | (2 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in RBG-Mode

Definition at line 4304 of file eBoard.h.

◆ EBOARD_NEO_RBGW

#define EBOARD_NEO_RBGW   ((3 << 6) | (0 << 4) | (2 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in RBGW-Mode

Definition at line 4339 of file eBoard.h.

◆ EBOARD_NEO_RBWG

#define EBOARD_NEO_RBWG   ((2 << 6) | (0 << 4) | (3 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in RBWG-Mode

Definition at line 4337 of file eBoard.h.

◆ EBOARD_NEO_RGB

#define EBOARD_NEO_RGB   ((0 << 6) | (0 << 4) | (1 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in RGB-Mode

Definition at line 4302 of file eBoard.h.

◆ EBOARD_NEO_RGBW

#define EBOARD_NEO_RGBW   ((3 << 6) | (0 << 4) | (1 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in RGBW-Mode

Definition at line 4335 of file eBoard.h.

◆ EBOARD_NEO_RGWB

#define EBOARD_NEO_RGWB   ((2 << 6) | (0 << 4) | (1 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in RGWB-Mode

Definition at line 4333 of file eBoard.h.

◆ EBOARD_NEO_RWBG

#define EBOARD_NEO_RWBG   ((1 << 6) | (0 << 4) | (3 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in RWBG-Mode

Definition at line 4331 of file eBoard.h.

◆ EBOARD_NEO_RWGB

#define EBOARD_NEO_RWGB   ((1 << 6) | (0 << 4) | (2 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in RWGB-Mode

Definition at line 4329 of file eBoard.h.

◆ EBOARD_NEO_WBGR

#define EBOARD_NEO_WBGR   ((0 << 6) | (3 << 4) | (2 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in WBGR-Mode

Definition at line 4327 of file eBoard.h.

◆ EBOARD_NEO_WBRG

#define EBOARD_NEO_WBRG   ((0 << 6) | (2 << 4) | (3 << 2) | (1))
Macro or Constant :
Defines the amount of needed permutation when com. in WBRG-Mode

Definition at line 4325 of file eBoard.h.

◆ EBOARD_NEO_WGBR

#define EBOARD_NEO_WGBR   ((0 << 6) | (3 << 4) | (1 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in WGBR-Mode

Definition at line 4323 of file eBoard.h.

◆ EBOARD_NEO_WGRB

#define EBOARD_NEO_WGRB   ((0 << 6) | (2 << 4) | (1 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in WGRB-Mode

Definition at line 4321 of file eBoard.h.

◆ EBOARD_NEO_WRBG

#define EBOARD_NEO_WRBG   ((0 << 6) | (1 << 4) | (3 << 2) | (2))
Macro or Constant :
Defines the amount of needed permutation when com. in WRBG-Mode

Definition at line 4319 of file eBoard.h.

◆ EBOARD_NEO_WRGB

#define EBOARD_NEO_WRGB   ((0 << 6) | (1 << 4) | (2 << 2) | (3))
Macro or Constant :
Defines the amount of needed permutation when com. in WRGB-Mode

Definition at line 4317 of file eBoard.h.

◆ EBOARD_PWM_SPE

#define EBOARD_PWM_SPE   1
Macro or Constant :
duty cycle for async task execution... should be higher than 1

Definition at line 1583 of file eBoard.h.

Referenced by ISR().

◆ EBOARD_SHIFT_REGISTER

#define EBOARD_SHIFT_REGISTER   0x1
Macro or Constant :
This will appear as 0x1 in the docs but the real default value is 0x0

Definition at line 526 of file eBoard.h.

◆ EBOARD_SPI_SERVO_MAX

#define EBOARD_SPI_SERVO_MAX   2
Macro or Constant :
this sets the amount of connected servos to the shield

Definition at line 1558 of file eBoard.h.

◆ EBOARD_USE_RESET

#define EBOARD_USE_RESET   0x1
Macro or Constant :
set this to 0x0 to disable software reset

Definition at line 1637 of file eBoard.h.

◆ EBOARD_USE_SPI

#define EBOARD_USE_SPI   0x1
Macro or Constant :
this has to be enabled to use the shield

Definition at line 1305 of file eBoard.h.

◆ EBOARD_USE_UTILITY

#define EBOARD_USE_UTILITY   0x1
Macro or Constant :
this will remove multiple wrapper from compile-segment. Probably won't change program size

Definition at line 1567 of file eBoard.h.

◆ EBOARD_VERSION

#define EBOARD_VERSION   "3.1m"
Macro or Constant :
Defines the Version of the eBoard Header

Definition at line 15 of file eBoard.h.

◆ FREQ_HIGH

#define FREQ_HIGH   0xB
Macro or Constant :
I2CInOut servant

Definition at line 3025 of file eBoard.h.

◆ FREQ_LOW

#define FREQ_LOW   0xA
Macro or Constant :
I2CInOut servant

Definition at line 3023 of file eBoard.h.

◆ GCC_VERSION

#define GCC_VERSION   (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

Definition at line 1729 of file eBoard.h.

◆ HIGHSPEED

#define HIGHSPEED
Macro or Constant :
This isn't defined by default. If you define it the LCD will be addressed with 400kHz. This will only work if every connected device supports 400kHz I²C!
Warning
Don't do if you don't know!

Definition at line 553 of file eBoard.h.

◆ LCD_COMMAND_BLACK_BACKGROUND

#define LCD_COMMAND_BLACK_BACKGROUND   0xA6
Macro or Constant :
[internal] value to set the background of the display to black

Definition at line 3883 of file eBoard.h.

◆ LCD_COMMAND_CHARGE_PUMP_ENABLE

#define LCD_COMMAND_CHARGE_PUMP_ENABLE   0x14
Macro or Constant :
[internal] value to set the PUMP to enabled

Definition at line 3896 of file eBoard.h.

◆ LCD_COMMAND_CHARGE_PUMP_SETTING

#define LCD_COMMAND_CHARGE_PUMP_SETTING   0x8d
Macro or Constant :
[internal] value to enable the PUMP settings

Definition at line 3894 of file eBoard.h.

◆ LCD_COMMAND_DISPLAY_OFF

#define LCD_COMMAND_DISPLAY_OFF   0xAE
Macro or Constant :
[internal] value to disable the display

Definition at line 3879 of file eBoard.h.

◆ LCD_COMMAND_DISPLAY_ON

#define LCD_COMMAND_DISPLAY_ON   0xAF
Macro or Constant :
[internal] value to enable the display

Definition at line 3881 of file eBoard.h.

◆ LCD_COMMAND_MODE

#define LCD_COMMAND_MODE   0x80
Macro or Constant :
[internal] value to set OLED into command mode

Definition at line 3875 of file eBoard.h.

◆ LCD_COMMAND_SET_BRIGHTNESS

#define LCD_COMMAND_SET_BRIGHTNESS   0x81
Macro or Constant :
[internal] value to change the brightness of the display

Definition at line 3887 of file eBoard.h.

◆ LCD_COMMAND_WHITE_BACKGROUND

#define LCD_COMMAND_WHITE_BACKGROUND   0xA7
Macro or Constant :
[internal] value to set the background of the display to white

Definition at line 3885 of file eBoard.h.

◆ LCD_DATA_MODE

#define LCD_DATA_MODE   0x40
Macro or Constant :
[internal] value to set OLED into data mode

Definition at line 3877 of file eBoard.h.

◆ LCD_HEIGHT

#define LCD_HEIGHT   64
Macro or Constant :
HEIGHT of all Displays

Definition at line 3904 of file eBoard.h.

◆ LCD_HORIZONTAL_ADDRESSING

#define LCD_HORIZONTAL_ADDRESSING   0x00
Macro or Constant :
[internal] value to set the display into horizontal aaddressing mode

Definition at line 3891 of file eBoard.h.

◆ LCD_PAGE_ADDRESSING

#define LCD_PAGE_ADDRESSING   0x02
Macro or Constant :
[internal] value to set the display into page addressing mode

Definition at line 3889 of file eBoard.h.

◆ LCD_WIDTH

#define LCD_WIDTH   128
Macro or Constant :
WIDTH of all displays

Definition at line 3900 of file eBoard.h.

◆ main

#define main   eVirtual_main
Macro or Constant :
This is used for copy_and_paste and renames the copied main-method

Definition at line 597 of file eBoard.h.

◆ PIN_BLUETOOTH_RX

#define PIN_BLUETOOTH_RX   0x13
Macro or Constant :
this is the RX-Pin reserved for bluetooth communication

Definition at line 1663 of file eBoard.h.

◆ PIN_BLUETOOTH_STATE

#define PIN_BLUETOOTH_STATE   0x13
Macro or Constant :
this is the STATE PIN. If it is equal to the PIN_BLUETOOTH_RX it won't be used!

Definition at line 1652 of file eBoard.h.

◆ PIN_BLUETOOTH_TX

#define PIN_BLUETOOTH_TX   0x12
Macro or Constant :
this is the TX-Pin reserved for bluetooth communication

Definition at line 1674 of file eBoard.h.

◆ PIN_MAX

#define PIN_MAX   0x32
Macro or Constant :
This defines the Maximum to-address pin. On MEGA its 49 on UNO its 9

Definition at line 614 of file eBoard.h.

◆ PIN_MOTOR_DIR

#define PIN_MOTOR_DIR   0x4
Macro or Constant :
this is the DiOut pin reserved to control the dir of the main motor

Definition at line 1684 of file eBoard.h.

◆ PIN_MOTOR_SPE

#define PIN_MOTOR_SPE   0x5
Macro or Constant :
this is the DiOut FAST_PWM [~1kHz] pin reserved to control the dir of the main motor

Definition at line 1691 of file eBoard.h.

Referenced by trig_rept_task().

◆ PIN_SHIFT_CLK

#define PIN_SHIFT_CLK   0x6
Macro or Constant :
this is the clock pin for the SN74HC595

Definition at line 1698 of file eBoard.h.

◆ PIN_SHIFT_DAT

#define PIN_SHIFT_DAT   0x7
Macro or Constant :
this is the data pin for the SN74HC595

Definition at line 1704 of file eBoard.h.

◆ PIN_SHIFT_LAT

#define PIN_SHIFT_LAT   0x8
Macro or Constant :
this is the latch pin for the SN74HC595

Definition at line 1710 of file eBoard.h.

◆ PREPROCESS_DEBUG

#define PREPROCESS_DEBUG   1
Macro or Constant :
determines if there should be preprocessor output from eBoard-headerfile

Definition at line 21 of file eBoard.h.

◆ PWM_FAST

#define PWM_FAST   0x9
Macro or Constant :
I2CInOut servant

Definition at line 3021 of file eBoard.h.

◆ PWM_SLOW

#define PWM_SLOW   0x8
Macro or Constant :
I2CInOut servant

Definition at line 3019 of file eBoard.h.

◆ REPT_TASK

#define REPT_TASK
Macro or Constant :
This constant won't be defined by default :D
This enables you to make use of the async features

Definition at line 534 of file eBoard.h.

◆ SPI_2XCLOCK_MASK

#define SPI_2XCLOCK_MASK   0x01
Macro or Constant :
the scaled clock mask to apply the correct devider

Definition at line 1342 of file eBoard.h.

◆ SPI_CLOCK_DIV128

#define SPI_CLOCK_DIV128   0x03
Macro or Constant :
this will set the clock devider to 128

Definition at line 1320 of file eBoard.h.

◆ SPI_CLOCK_DIV16

#define SPI_CLOCK_DIV16   0x01
Macro or Constant :
this will set the clock devider to 16

Definition at line 1316 of file eBoard.h.

◆ SPI_CLOCK_DIV2

#define SPI_CLOCK_DIV2   0x04
Macro or Constant :
this will set the clock devider to 2

Definition at line 1322 of file eBoard.h.

◆ SPI_CLOCK_DIV32

#define SPI_CLOCK_DIV32   0x06
Macro or Constant :
this will set the clock devider to 32

Definition at line 1326 of file eBoard.h.

◆ SPI_CLOCK_DIV4

#define SPI_CLOCK_DIV4   0x00
Macro or Constant :
this will set the clock devider to 4

Definition at line 1314 of file eBoard.h.

◆ SPI_CLOCK_DIV64

#define SPI_CLOCK_DIV64   0x02
Macro or Constant :
this will set the clock devider to 64

Definition at line 1318 of file eBoard.h.

◆ SPI_CLOCK_DIV8

#define SPI_CLOCK_DIV8   0x05
Macro or Constant :
this will set the clock devider to 8

Definition at line 1324 of file eBoard.h.

◆ SPI_CLOCK_MASK

#define SPI_CLOCK_MASK   0x03
Macro or Constant :
the clock mask to apply the correct devider

Definition at line 1340 of file eBoard.h.

◆ SPI_MODE0

#define SPI_MODE0   0x00
Macro or Constant :
this will set the mode to 0

Definition at line 1329 of file eBoard.h.

◆ SPI_MODE1

#define SPI_MODE1   0x04
Macro or Constant :
this will set the mode to 1

Definition at line 1331 of file eBoard.h.

◆ SPI_MODE2

#define SPI_MODE2   0x08
Macro or Constant :
this will set the mode to 2

Definition at line 1333 of file eBoard.h.

◆ SPI_MODE3

#define SPI_MODE3   0x0C
Macro or Constant :
this will set the mode to 3

Definition at line 1335 of file eBoard.h.

◆ SPI_MODE_MASK

#define SPI_MODE_MASK   0x0C
Macro or Constant :
the mode mask to apply correct mode

Definition at line 1338 of file eBoard.h.

Typedef Documentation

◆ optVAL_t

typedef int optVAL_t

Definition at line 1458 of file eBoard.h.

Function Documentation

◆ __assert()

void __assert ( const char *  __func,
const char *  __file,
optVAL_t  __lineno,
const char *  __sexp 
)

[DEBUG_MODE] custom assert message

Parameters
__functhe function name
__filethe file name
__linenothe line number
__sexpthe expression
Note
Example output when using a not-allowed pin:
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

◆ _serial()

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

◆ checkIdx()

void checkIdx ( optVAL_t  idx)
inline

[DEBUG_MODE] used to check if a pin index is in bounds

Note
if not, an assert-error will be raised
Parameters
idxthe index of the pin to check
Returns
nothing, blocks on error

◆ checkOverflow()

bool checkOverflow ( void  )
inline

[BLUETOOTH] checks if theres a lack of Data!

Note
if this happens you should consider to lower the sending or faster the receiving rate ;)
Returns
true if the overflow has happened
false if used on MEGA with default pins as there is no hardware based buffer control :/
false if there is no overflow (recognized)

◆ checkPin()

bool checkPin ( optVAL_t  idx,
optVAL_t  mode = 0x1 
)
inline

[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode

Note
this is no hardware test... this test is based on hard coded data
Parameters
idxthe index of the pin to check
modethe mode the pin should be checked for
Returns
true if the pin is in the requested mode

🔧 I prevent errors!

◆ countSetBits()

optVAL_t countSetBits ( optVAL_t  x)

[COPY&PASTE] [CHECK_PWM] counts high-bits in an int/byte (determined by IGNORE_SIZE)

Parameters
xthe number to check
Returns
the amount of high-bits

◆ eVirtual_main()

int eVirtual_main ( )

[COPY&PASTE] Assures the existence of the "qfix-code-main-method"

◆ gamma8()

int gamma8 ( uint8_t  val)
inline

will return the mapped 8-bit gamma correction you can use in e.g. NeoPixel

Parameters
valthe value [0-255] to map
Returns
the mapped value

Definition at line 571 of file eBoard.h.

571  {
572  return int(pow((val)/255.0,2.6)*255.0+0.5);
573  }

◆ isConnected()

bool isConnected ( void  )
inline

[BLUETOOTH] this will check if the HC-05 is paired

Returns
if PIN_BLUETOOTH_STATE != PIN_BLUETOOTH_RX:
    true if the HC-05 is paired
    false if the HC-05 is disconnected
if PIN_BLUETOOTH_STATE == PIN_BLUETOOTH_RX
    true in any case - because we don't know ^^

◆ ISR()

ISR ( TIMER2_OVF_vect  )

Definition at line 6437 of file eBoard.h.

References EBOARD_PWM_SPE, timer_count, timer_ofl, and trig_rept_task().

6437  {
6438  timer_count++;
6439  if(timer_count >= EBOARD_PWM_SPE*1000 && !timer_ofl){
6440  timer_ofl = true;
6441  timer_count -= EBOARD_PWM_SPE*1000;
6442  trig_rept_task();
6443  timer_ofl = false;
6444  }
6445  TCNT2 = 256 - (int)((float)F_CPU * 0.001 / 64);
6446  }
bool timer_ofl
Definition: eBoard.h:6436
void trig_rept_task()
Definition: eBoard.h:6423
#define EBOARD_PWM_SPE
Definition: eBoard.h:1583
int timer_count
Definition: eBoard.h:6435
+ Here is the call graph for this function:

◆ loop()

void loop ( void  )

[COPY&PASTE] As we have an Arduino we need a setup function ;)

◆ pingI2C()

void pingI2C ( optVAL_t  ret[],
optVAL_t  ret_len 
)
inline

Sends a byte to a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
retan array of optVAL_t
ret_lenthe length of the array

◆ readI2C()

void readI2C ( optVAL_t  deviceID,
optVAL_t  ret[],
optVAL_t  ret_len,
bool  blocking = true 
)
inline

Reads a special amount of bits from a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
deviceIDthe target device
retthe buffer to send
ret_lensize of buffer
blockingshould the Arduino wait until there is Data?

◆ readPin()

optVAL_t readPin ( optVAL_t  idx,
bool  dig = true 
)
inline

read a digital state from an INPUTpin

Note
this will automatically call setPin if COPY&PASTE
Parameters
idxthe index of the pin to use
digdetermines if the value should be from the digital or the analog pins
Returns
the read value as optVAL_t

◆ readVal()

char readVal ( char  oF = '.')
inline

[BLUETOOTH] reads a single value from bluetooth if available!

Parameters
oFthe character returned on failure
Returns
the character read. Returns {oF} on failure!

◆ sendI2C() [1/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte *  buf,
byte  buf_len 
)
inline

Sends a buffer of bytes to a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
buf_lensize of buffer
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN

◆ sendI2C() [2/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte  buf 
)
inline

Sends a byte to a certain I2C-Device.

Note
Using I2C won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN

◆ set_motor_speed()

void set_motor_speed ( optVAL_t  spe)
inline

sets the speed of the main (data pin: EBOARD_NANO_MAIN) motor

Parameters
spethe speed of the Motor [0;180] 90 means stop

◆ set_steer_angle()

void set_steer_angle ( optVAL_t  ang)
inline

sets the angle of the steering (data pin: EBOARD_NANO_STEER) motor

Parameters
angthe angle of the motor should drive to [0;180]

◆ setPin()

void setPin ( optVAL_t  idx,
optVAL_t  mode = 0x1 
)

[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then

Parameters
idxthe index of the pin to set
modethe mode the pin should be set to

◆ setup()

void setup ( void  )

this is a guard

[COPY&PASTE] As we have an Arduino we need a setup function ;)

◆ shiftAll()

void shiftAll ( void  )

[SHIFT] Changes bits according to store_bits

◆ shiftSingle()

void shiftSingle ( optVAL_t  idx,
bool  val 
)
inline

[SHIFT] Changes a single output Pin

Parameters
idxindex of the bit :D
valthe new state of this bit
Note
uses store_bits

◆ sine8()

int sine8 ( uint8_t  val)
inline

will return the mapped 8-bit sin you can use in e.g. NeoPixel

Parameters
valthe value [0-255] to map
Returns
the mapped value

Definition at line 563 of file eBoard.h.

563  {
564  return int((__builtin_sin((val/128.0*PI))+1)*127.5+0.5);
565  }

◆ trig_rept_task()

void trig_rept_task ( )

Definition at line 6423 of file eBoard.h.

References _OpwmValue, _pwmValue, and PIN_MOTOR_SPE.

Referenced by ISR().

6423  {
6424  if (_pwmValue!=_OpwmValue){
6425  analogWrite(PIN_MOTOR_SPE,_pwmValue);
6427  }
6428  #ifdef REPT_TASK
6429  rept_task();
6430  #endif
6431  }
optVAL_t _OpwmValue
Definition: eBoard.h:2569
#define PIN_MOTOR_SPE
Definition: eBoard.h:1691
optVAL_t _pwmValue
Definition: eBoard.h:2569
+ Here is the caller graph for this function:

◆ writePin()

void writePin ( optVAL_t  idx,
bool  val 
)
inline

write a boolean state to an output pin

Note
this will automatically call setPin if COPY&PASTE
if SHIFT_REGISTER is enabled you can assign the additional outputs 0-based from 100
Parameters
idxthe index of the pin to use
valthe state the pin should have

◆ writePWM()

void writePWM ( optVAL_t  val)
inline

write a clamped pwm value to an output pin

Note
this will use PIN_MOTOR_SPE
The value gets updated every EBOARD_PWM_SPE seconds
Parameters
valthe pwm value [0-255] to use

◆ writeVal()

template<typename T >
void writeVal ( const T &  val)
inline

[BLUETOOTH] writes Data to bluetooth

Parameters
valThis is the data to be written. Can be int, str etc...

Variable Documentation

◆ _OpwmValue

optVAL_t _OpwmValue = 0x0

Definition at line 2569 of file eBoard.h.

Referenced by trig_rept_task().

◆ _pwmValue

optVAL_t _pwmValue = 0x0
Note
this is the current to-write PWM value

Definition at line 2569 of file eBoard.h.

Referenced by trig_rept_task().

◆ _servoHandler

ServoCds55 _servoHandler

this is the "to_use" instance of ServoCds55

Definition at line 2780 of file eBoard.h.

◆ basicFont

PROGMEM const byte basicFont[][8]

Definition at line 3514 of file eBoard.h.

◆ pin_in

uint64_t pin_in = 0x0
Note
[COPY&PASTE] [CHECK_PINS] bool set of already declared INPUT pins [16 bits on UNO and NANO 64 on MEGA]

Definition at line 2418 of file eBoard.h.

◆ pin_out

uint64_t pin_out = 0x0
Note
[COPY&PASTE] [CHECK_PINS] bool set of already declared OUTPUT pins [16 bits on UNO and NANO 64 on MEGA]
it is possible to read from portDE... but this isn't that much bigger – maybe a todo

Definition at line 2410 of file eBoard.h.

◆ SPI

SPIClass SPI

Definition at line 1432 of file eBoard.h.

◆ STOP

bool STOP = false
static
Macro or Constant :
this will end any loop done by eBoard
Note
you can manipulate this with REPT_TASK
to avoid desync bug this won't stop the nonblocking LCD connection!

Definition at line 1448 of file eBoard.h.

◆ store_bits

long store_bits = 0L

[SHIFT] Manipulate me to set Pins via bitSet operations

Definition at line 2537 of file eBoard.h.

◆ timer_count

int timer_count = 0

Definition at line 6435 of file eBoard.h.

Referenced by ISR().

◆ timer_ofl

bool timer_ofl = false

Definition at line 6436 of file eBoard.h.

Referenced by ISR().

◆ Wire

TwoWire Wire = TwoWire()

this is the well-known Arduino Wire Interface, just a little bit 'modified' ;P

Definition at line 1296 of file eBoard.h.