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.
sparki.accelX(); sparki.accelY(); sparki.accelZ();
Serial1.read(); Serial1.print(); Serial1.println();
sparki.beep(); sparki.beep(int freq); sparki.beep(int freq, int time);
sparki.gripperOpen(); sparki.gripperOpen(width_cm); sparki.gripperClose(); sparki.gripperClose(width_cm); sparki.gripperStop();
sparki.sendIR();
sparki.edgeLeft(); sparki.lineLeft(); sparki.lineCenter(); sparki.lineRight(); sparki.edgeRight();
sparki.readIR();
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);
sparki.lightLeft(); sparki.lightCenter(); sparki.lightRight();
sparki.magX(); sparki.magY(); sparki.magZ();
radio.writeChar(char) radio.writeInt(int) radio.writeFloat(float) radio.readChar() radio.readInt() radio.readFloat() radio.available()
sparki.RGB(R,G,B);
digitalWrite(STATUS_LED, HIGH); digitalWrite(STATUS_LED, LOW); analogWrite(STATUS_LED, 0); analogWrite(STATUS_LED, 123); analogWrite(STATUS_LED, 255);
sparki.moveForward(distance_centimeters); sparki.moveBackward(distance_centimeters); sparki.moveLeft(angle_degrees); sparki.moveRight(angle_degrees); sparki.moveStop();
sparki.servo(angle_degrees);
sparki.motorRotate(int motor, int direction, int speed); sparki.motorStop(int motor);
sparki.ping();