Articles Posted by the Author:

  • write()

    write()

    Description Writes a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with 0 being full-speed in one direction, 180 being full speed […]


  • attach()

    attach()

    Description Attach the Servo variable to a pin. Syntax servo.attach(pin) servo.attach(pin, min, max) Parameters servo: a variable of type Servo pin: the number of the pin that the servo is attached to min (optional): the pulse width, in microseconds, corresponding to the minimum (0-degree) angle on the servo (defaults to 544) max (optional): the pulse […]


  • rewindDirectory()

    rewindDirectory()

    Description rewindDirectory() will bring you back to the first file in the directory, used in conjunction with openNextFile(). Syntax file.rewindDirectory() Parameters file: an instance of the File class (returned by SD.open()) Returns None Example See Also - open() - openNextFile() - isDirectory() Libraries Reference Home The text of the 86Duino reference is a modification of […]


  • openNextFile()

    openNextFile()

    Description Reports the next file or folder in a directory. Syntax file.openNextFile() Parameters file: an instance of the File class (returned by SD.open()) Returns the next file or folder in the path Example See Also - isDirectory() - rewindDirectory() Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, […]


  • isDirectory()

    isDirectory()

    Description Directories (or folders) are special kinds of files, this function reports if the current file is a directory or not. Syntax file.isDirectory() Parameters file: an instance of the File class (returned by SD.open()) Returns boolean Example See Also - openNextFile() - rewindDirectory() Libraries Reference Home The text of the 86Duino reference is a modification […]


  • write()

    write()

    Description Write data to the file. Syntax file.write(data) file.write(buf, len) Parameters file: an instance of the File class (returned by SD.open()) data: the byte, char, or string (char *) to write buf: an array of characters or bytes len: the number of elements in buf Returns byte: write() will return the number of bytes written, […]


  • read()

    read()

    Description Read a byte from the file. read() inherits from the Stream utility class. Syntax file.read() Parameters file: an instance of the File class (returned by SD.open()) Returns The next byte (or character), or -1 if none is available. See Also - available() - peek() - write() - Stream.read() Libraries Reference Home The text of […]


  • size()

    size()

    Description Get the size of the file. Syntax file.size() Parameters file: an instance of the File class (returned by SD.open()) Returns the size of the file in bytes (unsigned long) Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 […]


  • seek()

    seek()

    Description Seek to a new position in the file, which must be between 0 and the size of the file (inclusive). Syntax file.seek(pos) Parameters file: an instance of the File class (returned by SD.open()) pos: the position to which to seek (unsigned long) Returns true for success, false for failure (boolean) See Also - position() […]


  • println()

    println()

    Description Print data, followed by a carriage return and newline, to the File, which must have been opened for writing. Prints numbers as a sequence of digits, each an ASCII character (e.g. the number 123 is sent as the three characters ‘1’, ‘2’, ‘3’). Syntax file.println() file.println(data) file.print(data, BASE) Parameters file: an instance of the […]