Popular programming languages in robotics.
A robot control software is a program for controlling robots. Robot Operating System is a middleware a collection of software frameworks for robot software development. Therefore, on each loop, get the current program time. Robot programming is the development of a control scheme for how a machine interacts with its environment and achieve its goals. Most of the LED-related functions are timing based.
Rotate the display to show the QR codes the right side up tBrightness(50) // The LEDs do not need to be super bright Pixels.clear() // Set all pixel colors to 'off' to start Pixels.begin() // Initialize NeoPixel object Int imageSelector = 1 // An image used to select which image to display Int totalQRimages = 3 // The total number of QR code images stored on the SD card Int prevDispChange = 0 // A variable for tracking the last time the image on the eInk display was changed
Int prevFlash = 0 // The time the LEDs last flashedīool flashState = true // A boolearn for turning the LEDs on and off Int flashInterval = 1000 // The interval for flashing the LEDs Int wrenchFlashColor = 1 // A variable for the color for the wrench LEDs Int mode = 1 // A variable for tracking what animation to use for the wrench LEDs (1 = rainbow cycle, 2 = color flash, 3 = split rainbow)įloat wrenchRainbowColor = 1.00 // A variable for the color for the wrench LEDs Int eyeB = 193 // The eye LED blue channel Int eyeG = 204 // The eye LED green channel Long blinkInterval = 2000 // The LED on the top of the antenna blinks on a random interval between two and seven secondsĬonst int blinkDuration = 200 // This variable determines how long each antenna blink lasts Int prevBlink = 0 // A variable for tracking the last time the antenna LED blinked Long progTime = 0 // A variable for tracking the time since the program started running via millis() method #define EPD_BUSY -1 // Do not use a pin (will wait a fixed delay)Īdafruit_SSD1608 display(200, 200, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY) #include "Adafruit_EPD.h" // Hardware-specific library Include the libarries necessary to control the display
Create some color variables to use with the LEDs The LEDs are all in a single 'strip' with the index on the strip used to activate #define NUMPIXELS 5 // There are five LEDsĪdafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800) one on each eye, and two on the wrench
There are a total of five LEDs on the Maker Pro robot badge: one on the antenna, #define PIN 6 // The LEDs are all controlled from pin 6