Skip to content

Instantly share code, notes, and snippets.

@ArduinoDiscordBot
Created January 6, 2021 05:28
Show Gist options
  • Save ArduinoDiscordBot/2f619c37cd576de82fb4b283705da6c9 to your computer and use it in GitHub Desktop.
Save ArduinoDiscordBot/2f619c37cd576de82fb4b283705da6c9 to your computer and use it in GitHub Desktop.
Code by Jaewon#0001 - Wed Jan 06 2021 05:28:31 GMT+0000 (Coordinated Universal Time)

This gist was pasted by the Arduino discord server bot.

This gist was automatically pasted at the request of the code author or one of the discord server helpers. If you have any suggestions or bugs to report, you can do so on our GitHub repository, or in our discord server. This project is run by volunteers so feel free to fork and commit your changes then open a pull request!


⬇️ Pasted Code ⬇️

//Libraries
#include <SoftwareSerial.h>
SoftwareSerial Scanner(10,11); // RX, TX
//Pin definitions
#define led1Pin 2
#define led2Pin 3
#define led3Pin 4
#define led4Pin 5
//Declare variables
#define BUFFER_LEN 40
char scanBuffer[BUFFER_LEN];
char barCode1[BUFFER_LEN]={'1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9',
'1','2','3','4','5','6','7','8','9','A','B','C','D'};
char barCode2[BUFFER_LEN]={'1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9',
'1','2','3','4','5','6','7','8','9','A','B','C','D'};
char barCode3[BUFFER_LEN]={'1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9',
'1','2','3','4','5','6','7','8','9','A','B','C','D'};
char barCode4[BUFFER_LEN]={'1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9','1','2','3','4','5','6','7','8','9',
'1','2','3','4','5','6','7','8','9','A','B','C','D'};
uint8_t i;
uint8_t correct[4];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment