Digital Electronics Lab 11

Below is my code in part_1_button: #include "Button.h" Button buttonOne(33, 1); Button buttonTwo(34, 3); Button buttonThree(35, 5); Button buttonFour(36, 6); void setup() {  Serial.begin(9600);  buttonOne.pressHandler(onPress);  buttonOne.releaseHandler(onRelease);  buttonTwo.pressHandler(onPress);  buttonTwo.releaseHandler(onRelease);  buttonThree.pressHandler(onPress);  buttonThree.releaseHandler(onRelease);  buttonFour.pressHandler(onPress);  buttonFour.releaseHandler(onRelease); } void loop() {  buttonOne.process();  buttonTwo.process();  buttonThree.process();  buttonFour.process(); } void onPress(int buttonNumber) {  Serial.print(buttonNumber);  Serial.println(" pressed"); } void onRelease(int buttonNumber) {  Serial.print(buttonNumber);  Serial.println("Continue reading “Digital Electronics Lab 11”

Digital Electronics Lecture Assignment 9 (Edited)

Below is my Processing code: import processing.serial.*; Serial teensySerial; int val = 0; int r = 0; int g = 0; int b = 0; int shapeX = 0; int shapeY = 0; int shapeSize = 0; int shapeSpeed = 0; void setup() {   size(600, 600);   printArray(Serial.list());   String usbPortName = Serial.list()[8];   teensySerial = new Serial(this, usbPortName, 9600);   Continue reading “Digital Electronics Lecture Assignment 9 (Edited)”

Design a site like this with WordPress.com
Get started