Parts of Sparki
A library reference for all parts of Sparki
Here’s all the parts that make up Sparki! Click on a part for more information on how it works and how to use it. Each part also has a quick reminder reference below it for the commands that go along with it. Accelerometer
1 2 3 |
sparki.accelX(); sparki.accelY(); sparki.accelZ(); |
1 2 3 |
Serial1.read(); Serial1.print(); Serial1.println(); |
1 2 3 |
sparki.beep(); sparki.beep(int freq); sparki.beep(int freq, int time); |
1 2 3 4 5 |
sparki.gripperOpen(); sparki.gripperOpen(width_cm); sparki.gripperClose(); sparki.gripperClose(width_cm); sparki.gripperStop(); |
1 |
sparki.sendIR(); |
1 2 3 4 5 |
sparki.edgeLeft(); sparki.lineLeft(); sparki.lineCenter(); sparki.lineRight(); sparki.edgeRight(); |
1 |
sparki.readIR(); |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
sparki.clearLCD(); sparki.updateLCD(); sparki.drawPixel(xPixel, yPixel); sparki.readPixel(xPixel, yPixe); sparki.drawChar(xPixel, yLine, char); sparki.drawString(xPixel, yLine, *char); sparki.drawLine(xStart, yStart, xEnd, yEnd); sparki.drawRect(xCenter, yCenter, width, heigh); sparki.drawRectFilled(xCenter, yCenter, width, height); sparki.drawCircle(xCenter, yCenter, radius); sparki.drawCircleFilled(xCenter, yCenter, radius); sparki.drawBitmap(xStart, yStart, *bitmap, width, height); |
1 2 3 |
sparki.lightLeft(); sparki.lightCenter(); sparki.lightRight(); |
1 2 3 |
sparki.magX(); sparki.magY(); sparki.magZ(); |
1 2 3 4 5 6 7 8 9 |
radio.writeChar(char) radio.writeInt(int) radio.writeFloat(float) radio.readChar() radio.readInt() radio.readFloat() radio.available() |
1 |
sparki.RGB(R,G,B); |
1 2 3 4 5 |
digitalWrite(STATUS_LED, HIGH); digitalWrite(STATUS_LED, LOW); analogWrite(STATUS_LED, 0); analogWrite(STATUS_LED, 123); analogWrite(STATUS_LED, 255); |
1 2 3 4 5 |
sparki.moveForward(distance_centimeters); sparki.moveBackward(distance_centimeters); sparki.moveLeft(angle_degrees); sparki.moveRight(angle_degrees); sparki.moveStop(); |
1 |
sparki.servo(angle_degrees); |
1 2 |
sparki.motorRotate(int motor, int direction, int speed); sparki.motorStop(int motor); |
1 |
sparki.ping(); |