Two Pins [PIC] Four Pins [PIC] Libraries Reference Home The text of the 86Duino reference is a modification of the 86Duino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
Description Sets the order of the bits shifted out of and into the SPI bus, either LSBFIRST (least-significant bit first) or MSBFIRST (most-significant bit first). Extended method for Arduino Due If you specify one of the Arduino Due’s Slave Select (SS) pin in the call to setBitOrder(), the bit order setting is applied only to […]
On the Arduino Due, the SAM3X has advanced SPI capabilities. It is possible to use these extended methods, or the AVR-based ones. The extended API can use pins 4, 10, and 52 for CS. Use You must specify each pin you wish to use as CS for the SPI devices. It is possible for the […]
Description Transfers one byte over the SPI bus, both sending and receiving. Extended method for Arduino Due If you specify one of the Arduino Due’s Slave Select (SS) pin in the call to SPI.transfer(), the specified pin is activated (pulled low) before the transfer occurs and deactivated (pulled high) when the transfer is finished. You […]
Description Sets the SPI data mode: that is, clock polarity and phase. See the Wikipedia article on SPI for details. Extended method for Arduino Due If you specify one of the Arduino Due’s Slave Select (SS) pin in the call to setDataMode(), the data mode setting is applied only to the device connected to the […]
Description Sets the SPI clock divider relative to the system clock. On AVR based boards, the dividers available are 2, 4, 8, 16, 32, 64 or 128. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock (4 Mhz for the boards at 16 MHz). Arduino Due […]
Description Detach the Servo variable from its pin. If all Servo variables are detached, then PWM pins can be used for PWM output with analogWrite(). Syntax servo.detach() Parameters servo: a variable of type Servo See also - attach() - attached() Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino […]
Description Check whether the Servo variable is attached to a pin. Syntax servo.attached() Parameters servo: a variable of type Servo Returns true if the servo is attached to pin; false otherwise. See also - attach() - detach() Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, and is […]
Description Read the current angle of the servo (the value passed to the last call to write()). Syntax servo.read() Parameters servo: a variable of type Servo Returns The angle of the servo, from 0 to 180 degrees. See also - write() Libraries Reference Home The text of the 86Duino reference is a modification of the […]
Description Writes a value in microseconds (uS) to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft. On standard servos a parameter value of 1000 is fully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle. Note that some manufactures do not follow this […]