2) Do the given controls seem like the best way to follow the guidelines of the project?
Kassadin's Gauntlet Code (Abilities):
#include <Adafruit_CircuitPlayground.h> #include <Adafruit_Circuit_Playground.h> #include <Mouse.h> #include <Keyboard.h> #include <Wire.h> #include <SPI.h> void setup() { // put your setup code here, to run once: // put your setup code here, to run once: CircuitPlayground.begin(); Serial.begin(9600); Mouse.begin(); Keyboard.begin(); CircuitPlayground.setBrightness(60); for(int i = 0; i < 9; i++){ CircuitPlayground.setPixelColor(i,128,0,128); } CircuitPlayground.setAccelRange(LIS3DH_RANGE_2_G); //need to create a variable to store the mouses last know position from the center point // Using mouse libraray exmaple code as a base lets cook } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin A0: int analogValue = analogRead(A3); // Rescale to potentiometer's voltage (from 0V to 5V): float voltage = analogValue * (3.3/ 1023); if(analogValue > 240){ Keyboard.press('q'); delay(75); Keyboard.release('q'); } if(analogValue > 240 && analogValue < 300){ Keyboard.press('w'); delay(75); Keyboard.release('w'); } if(analogValue > 300){ Keyboard.press('e'); delay(75); Keyboard.release('e'); } // print out the value you read: Serial.print("Analog: "); Serial.print(analogValue); Serial.print(", Voltage: "); Serial.println(voltage); }