Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Pololu AVR Library Command Reference View document on multiple pages. [https://www.pololu.com/docs/0J18] View this document as a printable PDF: avr_library_commands.pdf [https://www.pololu.com/docs/pdf/0J18/ avr_library_commands.pdf] 1. Introduction . . . . . . . . . . . . . . . 2. Orangutan Analog-to-Digital Conversion 3. Orangutan Buzzer: Beeps and Music . . 4. Orangutan Digital I/O . . . . . . . . . . 5. Orangutan LCD . . . . . . .
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 1. Introduction This document describes the Pololu AVR C/C++ Library, a programming library designed for use with Pololu products. The library is used to create programs that run on Atmel ATmega1284P, ATmega644P, ATmega324PA, ATmega328P, ATmega168 and ATmega48 processors, and it supports the following products: 1.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Pololu 3pi robot [https://www.pololu.com/product/975]: a mega168/328-based programmable robot. The 3pi robot essentially contains an SV-328 and a 5-sensor version of the QTR-8RC, both of which are in the list below. Pololu Orangutan SVP-1284 [https://www.pololu.com/product/1327]: based on the mega1284, the SVP-1284 is our newest Orangutan robot controller.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation for following lines on the floor, for obstacle or drop-off (stairway) detection, and for various other applications. Pololu QTR-1RC and QTR-8RC reflectance sensors (RC): a version of the above that is read using digital inputs; this is compatible with the Parallax QTI sensors. [https://www.pololu.com/product/959] [https://www.pololu.com/product/961] Encoder for Pololu Wheel 42×19 mm [https://www.pololu.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 2. Orangutan Analog-to-Digital Conversion The OrangutanAnalog class and the C functions in this section make it easy to use to the analog inputs and integrated analog hardware on the Orangutan robot controllers (LV, SV, SVP, X2, and Baby Orangutan) and 3pi robot. These functions take care of configuring and running the analog-to-digital converter.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Channels The tables below give a summary of the analog inputs available on your AVR. Some of these pins are hardwired or jumpered to the battery voltage or sensors or trimpots built in to your device, while other pins are available for you to connect your own sensors to. Please refer to the pin assignment table in the user’s guide for your device for more information.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Single-Ended Analog Channels on the Orangutan SVP Channel Pin Keyword Note 0 PA0/ADC0 1 PA1/ADC1 2 PA2/ADC2 3 PA3/ADC3 4 PA4/ADC4 5 PA5/ADC5 6 PA6/ADC6 7 PA7/ADC7 14 internal 1.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation *Pins PA6 and PA7 on the Orangutan X2 are connected by default through SMT jumpers to the a battery voltage divider circuit and the user trimpot, respectively. You should not make external connections to these pins without first breaking the default SMT jumper connections, which are located on the underside of the main board and labeled in the silkscreen “ADC6=BATLEV” and “ADC7=TRIMPOT”.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Function Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanAnalog::setMode(unsigned char mode) void set_analog_mode(unsigned char mode) Used to set the ADC for either 8-bit or 10-bit conversions. The mode argument should be the either MODE_8_BIT or MODE_10_BIT. When the ADC is in 8-bit mode, conversion results will range from 0 to 255 for voltages ranging from 0 to 5 V.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation static unsigned int OrangutanAnalog::readAverageMillivolts(unsigned char channel, unsigned int numSamples) unsigned int analog_read_average_millivolts(unsigned char channel, unsigned int numSamples) This function is just like analog_read_average() except the result is returned in millivolts. A return value of 5000 indicates a voltage of 5 V. This function is equivalent to to_millivolts(analog_read_average(channel, numSamples)).
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation static int readBatteryMillivolts_SV() int read_battery_millivolts_sv() Performs ten 10-bit analog-to-digital conversions on the battery voltage sensing circuit (a 1/3 voltage divider of VIN) of the Orangutan SV and returns the average measured battery voltage in millivolts. A result of 9153 would mean a battery voltage of 9.153 V.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation call to analog_conversion_result() or analog_conversion_result_millivolts() and this method can be used to start a new conversion. This function does not alter the I/O state of the analog pin that corresponds to the specified ADC channel. static unsigned char OrangutanAnalog::isConverting() unsigned char analog_is_converting() Returns a 1 if the ADC is in the middle of performing an analog-to-digital conversion, otherwise it returns a 0.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 3. Orangutan Buzzer: Beeps and Music The OrangutanBuzzer class and the C functions in this section allow various sounds to be played on the buzzer of the Orangutan LV, SV, SVP, X2, and 3pi robot, from simple beeps to complex tunes. The buzzer is controlled using one of the Timer 1 PWM outputs, so it will conflict with any other uses of Timer 1.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanBuzzer::playFrequency(unsigned int frequency, unsigned int duration, unsigned char volume) void play_frequency(unsigned int freq, unsigned int duration, unsigned char volume) This method will play the specified frequency (in Hz or 0.1 Hz) for the specified duration (in ms). The frequency argument must be between 40 Hz and 10 kHz.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation volume by one halves the duty cycle (so 14 gives a 25% duty cycle, 13 gives a 12.5% duty cycle, etc). The volume control is somewhat crude and should be thought of as a bonus feature. This function plays the note in the background while your program continues to execute. If you call another buzzer function while the note is playing, the new function call will overwrite the previous and take control of the buzzer.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation • ‘<’ plays the next note one octave lower • ‘+’ or ‘#’ after a note raises any note one half-step • ‘-’ after a note lowers any note one half-step • ‘.’ after a note “dots” it, increasing the length by 50%. Each additional dot adds half as much as the previous dot, so that “A..” is 1.75 times the length of “A”. • ‘O’ followed by a number sets the octave (default: O4).
Pololu AVR Library Command Reference { } © 2001–2015 Pololu Corporation OrangutanBuzzer::playFromProgramSpace(melody); #include const char melody[] PROGMEM = "!L16 V8 cdefgab>cbagfedc"; void someFunction() { play_from_program_space(melody); } static void OrangutanBuzzer::playMode(unsigned char mode) void play_mode(char mode) This method lets you determine whether the notes of the play() sequence are played automatically in the background or are driven by the play_check() method.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 4. Orangutan Digital I/O This section of the library provides commands for using the AVR’s pins as generic digital inputs and outputs. The code is all inline, which lets it compile to very small, fast, efficient assembly code if you use constants as your arguments.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanDigital::setOutput(unsigned char pin, unsigned char outputState); void set_digital_output(unsigned char pin, unsigned char output_state); Sets the specified pin as an output. The pin argument should be one of the IO_* keywords (e.g. IO_D1 for pin PD1).
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 5. Orangutan LCD The OrangutanLCD class and the C functions in this section provide a variety of ways of displaying data to the LCD screen of an Orangutan robot controller (LV, SV, SVP, and X2) and 3pi robot, providing an essential tool for user interfaces and debugging.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanLCD::clear() void clear() Clears the display and returns the cursor to the upper-left corner (0, 0). static void OrangutanLCD::initPrintf() void lcd_init_printf() Initializes the display for use with the standard C function printf(). This is not available in the Arduino environment. See the avr-libc manual [http://www.nongnu.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Prints a single ASCII character to the display at the current cursor position. This is the same as the unsigned char version above. Example: print_character('A'); // in C++: OrangutanLCD::print('A'); static void OrangutanLCD::print(const char *str) void print(const char *str) Prints a zero-terminated string of ASCII characters to the display starting at the current cursor position. The string will not wrap or otherwise span lines.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Prints the specified unsigned long (4-byte) value to the display at the current cursor position. The value will not wrap or otherwise span lines and will always be positive. static void OrangutanLCD::printHex(unsigned int value) void print_hex(unsigned int value) Prints the specified two-byte value in hex to the display at the current cursor position. The value will not wrap or otherwise span lines.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Note: the clear() method must be called before these characters are used. The pointer picture_ptr must be a pointer to an 8 byte array in program space containing the picture data. Bit 0 of byte 0 is the upper-right pixel of the 5×8 character, and bit 4 of byte 7 is the lower-left pixel. The example below demonstrates how to construct this kind of array. Example: #include // the PROGMEM macro comes from the pgmspace.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 6. Orangutan LEDs The OrangutanLEDs class and the C functions in this section are a very simple interface to the user LEDs included on Orangutan controllers and 3pi. The Orangutan X2 has five user LEDs (two red, two green, and one yellow), the Orangutan LV, SV, SVP, and 3pi have two user LEDs (one red and one green), and the Baby Orangutan has one user LED (red).
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanLEDs::red(unsigned char state) void red_led(unsigned char state) This method will turn the red user LED off if state is zero, it will toggle the LED state if state is 255, else it will turn the red user LED on.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation the keyword LOW as an argument to turn the LED off. You can use the keyword TOGGLE to toggle the LED state. static void OrangutanLEDs::yellow(unsigned char state) void yellow_led(unsigned char state) This method controls the Orangutan X2’s yellow user LED and is only defined for the Orangutan X2 version of the library.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 7. Orangutan Motor Control The OrangutanMotors class and the C functions in this section provide PWM-based speed (and direction) control of the two motor channels on the Orangutan controllers and 3pi.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanMotors::setM1Speed(int speed) void set_m1_speed(int speed) This method will set the speed and direction of motor 1. Speed is a value between -255 and +255. The sign of speed determines the direction of the motor and the magnitude determines the speed.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 8. Orangutan Pulse/PWM Inputs This section of the library makes it easy to measure pulse inputs such as hobby servo RC pulses, PWM frequency and duty cycle, discharge time of a capacitor (measured digitally), etc. For example, with these functions, it becomes simple to program your Orangutan to respond to multiple channels from an RC receiver or to read data from the multitude of sensors that use pulse outputs.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation • lastHighPulse : The width of the last detected high pulse in system ticks (units of 0.4 µs). A high pulse is one that starts with a channel transition from low to high and ends with a channel transition from high to low. • lastLowPulse : The width of the last detected low pulse in system ticks (units of 0.4 µs). A low pulse is one that starts with a channel transition from high to low and ends with a channel transition from low to high.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ methods are shown in red. C/C++ functions are shown in green. static unsigned char OrangutanPulseIn::start(const unsigned char pulse_pins[], unsigned char num_pins) unsigned char pulse_in_start(const unsigned char pulse_pins[], unsigned char num_pins) Configures the AVR’s pin-change interrupts to measure pulses on the specified pins. The num_pins parameter should be the length of the pulse_pins array.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Example // configure pins PD0 and PD1 as pulse input channels pulse_in_start((unsigned char[]) {IO_D0, IO_C3}, 2); struct PulseInputStruct pulseInfo; get_pulse_info(1, &pulseInfo); // get pulse info for pin PC3 if (pulseInfo.newPulse & HIGH_PULSE) someFunction(pulseInfo.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation This function returns the length in system ticks (units of 0.4 µs) of the last complete high pulse received on the specified pulse input channel. It gives you (interrupt-safe) access to the lastHighPulse member of the ISR-maintained PulseInputStruct for the specified channel. A high pulse is one that starts with a channel transition from low to high and ends with a channel transition from high to low.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Converts the provided pulse_width argument from system ticks to microseconds (this is the same as multiplying pulse_width by 0.4 µs, but without using floating-point math) and returns the result. The same result could be achieved by calling ticks_to_microseconds(pulse_width).
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 9. Orangutan Pushbuttons The OrangutanPushbuttons class and the C functions in this section make it easy to use to the three pushbuttons on the Orangutan LV, SV, SVP, X2, and 3pi robot as user-interface control inputs to your program. For a higher level overview of this library and programs that show how this library can be used, please see Section 3.g of the Pololu AVR C/C++ Library User’s Guide [https://www.pololu.com/docs/0J20]. 9.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static unsigned char OrangutanPushbuttons::getSingleDebouncedPress(unsigned char buttons) unsigned char get_single_debounced_button_press(unsigned char buttons) This is a non-blocking function that makes it very easy to perform button-triggered activities from within your main loop.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation The pushbuttons2 example shows how this function can be used to trigger events in your main loop. static unsigned char OrangutanPushbuttons::waitForPress(unsigned char buttons) unsigned char wait_for_button_press(unsigned char buttons) This function will wait for any of the buttons specified by buttons to be pressed, at which point execution will return.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 10. Orangutan Serial Port Communication The OrangutanSerial class and the C functions in this section provide access to the serial port(s) on the Orangutan controllers and 3pi robot., enabling two-way TTL-level communication with another microcontroller, a serial device, or (through a USB-serial adapter or RS-232 level converter) a personal computer.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ methods are shown in red. C functions are shown in green. static void OrangutanSerial::setBaudRate([unsigned char port,] unsigned long baud) unsigned char serial_set_baud_rate([unsigned char port,] unsigned long baud) Sets the baud rate on the serial port. Standard values up to 115200 should work fine; for higher speeds, please consult the AVR documentation.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation that you should almost always wait until the data has been sent before calling this function again. See serial_send_blocking(), below, for an easy way to do this.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 11. Orangutan Servos This section of the library provides the ability to control up to 16 servos by generating digital pulses directly from your Orangutan without the need for a separate servo controller. These servo control functions are non-blocking; pulses are generated in the background by an interrupt while the rest of your code executes.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static unsigned char OrangutanServos::start(const unsigned char servo_pins[], unsigned char num_pins) unsigned char servos_start(const unsigned char servo_pins[], unsigned char num_pins) Configures the AVR’s Timer 1 module to generate pulses for up to 8 servos. The num_pins parameter should be the length of the servo_pins array.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Stops Timer 1, sets all used servo pins as driving-low outputs, and frees up the memory that was dynamically allocated by the servos_start() or servos_start_extended() function. If you want to use Timer 1 for some other purpose, such as playing sounds using OrangutanBuzzer functions, you should call servos_stop() first. Servos cannot be used after calling servos_stop() without first calling servos_start() or servos_start_extended() again.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 12. Orangutan SPI Master Functions This section of the library provides commands for using the AVR’s Serial Peripheral Interface (SPI) module in master mode to communicate with slave SPI devices.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanSPIMaster::init(unsigned char speed_divider, unsigned char options) void spi_master_init(unsigned char speed_divider, unsigned char options) Initializes the AVR’s hardware SPI module in master mode. This command makes the MOSI and SCK pins outputs so that the AVR can send data to the slave device.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation static unsigned char OrangutanSPIMaster::transmit(unsigned char data) unsigned char spi_master_transmit(unsigned char data) Transmits the given byte of data to the SPI slave device, and returns the byte that the slave simultaneously sent back.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 13. Orangutan SVP Functions This section of the library provides commands that are only available on the Orangutan SVP [https://www.pololu.com/product/1325]. For a higher level overview of how the library works on the Orangutan SVP, please see Section 3.j of the Pololu AVR C/C++ Library User’s Guide [https://www.pololu.com/docs/0J20]. 13.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void OrangutanSVP::setMode(unsigned char mode) void svp_set_mode(unsigned char mode) This command sets the mode of the Orangutan SVP’s auxiliary processor. The mode parameter determines the functions of the auxiliary lines A, B, C, and D.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Returns 1 if the device is in the USB Suspend State. If the device is connected to a computer, this usually indicates that the computer has gone to sleep, but on some computers the Suspend State occurs several times whenever the device is plugged in.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 14. Orangutan System Resources This section of the library is intended offers general AVR resources. Currently, it only provides information about the amount of free RAM on the AVR. static unsigned char OrangutanResources::getFreeRAM() unsigned char get_free_ram() Returns an estimate of the available free RAM on the AVR, in bytes.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 15. Orangutan X2 Functions These functions are all commented in the library source code libpololu-avr/src/OrangutanX2/ OrangutanX2.cpp [https://github.com/pololu/libpololu-avr/blob/master/src/OrangutanX2/OrangutanX2.cpp]. 15.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 16. QTR Reflectance Sensors The PololuQTRSensors class and the C functions in this section provide an interface for using Pololu’s QTR reflectance sensors [https://www.pololu.com/product/961] together with the Orangutan. The library provides access to the raw sensors values as well as to high level functions including calibration and line-tracking. We recommend not using this part of the library directly on the 3pi.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and methods are shown in red. C functions are shown in green. void PololuQTRSensors::read(unsigned int *sensorValues, unsigned char readMode = QTR_EMITTERS_ON) void qtr_read(unsigned int *sensorValues, unsigned char readMode) Reads the raw sensor values into an array. There MUST be space for as many values as there were sensors specified in the constructor.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation void PololuQTRSensors::readCalibrated(unsigned int *sensorValues, unsigned char readMode = QTR_EMITTERS_ON) void qtr_read_calibrated(unsigned int *sensorValues, unsigned char readMode) Returns sensor readings calibrated to a value between 0 and 1000, where 0 corresponds to a reading that is less than or equal to the minimum value read by calibrate() and 1000 corresponds to a reading that is greater than or equal to the maximum value.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation PololuQTRSensors::~PololuQTRSensors() The destructor for the PololuQTRSensors class frees up memory allocated for the calibration arrays. This feature is not available in C. PololuQTRSensorsRC::PololuQTRSensorsRC() This constructor performs no initialization. If it is used, the user must call init() before using the methods in this class.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation This constructor just calls init(), below. void PololuQTRSensorsAnalog::init(unsigned char* analogPins, unsigned char numSensors, unsigned char numSamplesPerSensor = 4, unsigned char emitterPin = 255) void qtr_analog_init(unsigned char* analogPins, unsigned char numSensors, unsigned char numSamplesPerSensor, unsigned char emitterPin) Initializes a QTR-A (analog) sensor array.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 17. Timing and Delays The following timing and delay functions are designed for the Orangutans and 3pi robot, which run at 20 MHz. They will give different results at other processor frequencies. These functions are not available within the Arduino environment, which has its own delay functions.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ methods are shown in red. C/C++ functions are shown in green. static void OrangutanTime::delayMilliseconds(unsigned int milliseconds) void delay_ms(unsigned int milliseconds) void delay(unsigned int milliseconds) Delays for the specified number of milliseconds.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation // and the following call will result in an INCORRECT measure of the elapsed time in us elapsed_time_us = ticks_to_microseconds(get_ticks()) - ticks_to_microseconds(prev_ticks); static unsigned long OrangutanTime::ticksToMicroseconds(unsigned long num_ticks) unsigned long ticks_to_microseconds(unsigned long num_ticks) Returns the number of microseconds corresponding to the supplied number of ticks, num_ticks. One tick equals 0.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 18. Wheel Encoders The PololuWheelEncoders class and the associated C functions provide an easy interface for using the Pololu Wheel Encoders [https://www.pololu.com/product/1217], which allow a robot to know exactly how far its motors have turned at any point in time. This section of the library makes uses of pin-change interrupts to quickly detect and record each transition on the encoder.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Reference C++ and Arduino methods are shown in red. C functions are shown in green. static void PololuWheelEncoders::init(unsigned char m1a, unsigned char m1b, unsigned char m2a, unsigned char m2b) void encoders_init(unsigned char m1a, unsigned char m1b, unsigned char m2a, unsigned char m2b) Initializes the wheel encoders. The four arguments are the four pins that the wheel encoders are connected to.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation 19. 3pi Robot Functions This section of the library provides convenient access for 3pi-specific hardware. Currently, it only provides access for the 5 QTR-based line sensors that are included in the 3pi. That is, the QTR functions described in Section 16 do not need to be used for the 3pi. The functions described below are enabled by including one of the 3pi files: #include #include
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation Example usage: unsigned int sensor_values[5]; read_line_sensors(sensor_values); void Pololu3pi::emittersOn() void emitters_on() Turn the IR LEDs on. This is mainly for use by read_line_sensors(), and calling this function before or after the reading the sensors will have no effect on the readings, but you may wish to use it for testing purposes. void Pololu3pi::emittersOff() void emitters_off() Turn the IR LEDs off.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation unsigned int* get_line_sensors_calibrated_minimum_on() The calibrated minumum values measured for each sensor, with emitters on. The pointers are unallocated and set to 0 until calibrate() is called, and then allocated to exactly the size required. Depending on the readMode argument to calibrate(), only the On or Off values may be allocated, as required.