<commit_before>// Yes, this is actually -*-c++-*-

/*!
  This sketch is responsible for the Handshake interactions


  Example commands:
HANDSHAKE 1 0
HANDSHAKE 1 1
HANDSHAKE 1 2

PANEL-SET 5 0 100 user0 easein
PANEL-SET 5 1 100 user1 easein
PANEL-SET 5 2 100 user2 easein
//PANEL-SET 5 3 100 white easein
PANEL-PULSE 5 3 100 white sleep
PANEL-SET 6 0 100 user0
PANEL-SET 6 1 100 user0
PANEL-SET 6 2 100 user0

PANEL-SET 3 0 100 user0 easein
PANEL-SET 3 1 100 user1 easein
PANEL-SET 3 2 100 user2 easein
PANEL-SET 3 3 100 succedss easein
PANEL-SET 3 4 100 error easein
PANEL-SET 3 5 100 white easein

*/

#include "HandshakeInterface.h"
#include <Wire.h> // Needed to make Arduino add the corresponding include path
#include "TouchSensor.h"
#include "Pixel.h"
#include "LEDStrip.h"
#include "anyware_serial.h"

// Set to 1 to start in debug mode
#define DEBUG_MODE 1

#define TOUCH_SENSOR_PIN  2
#define VIB_PIN  3
#define LED1_PIN  4
#define LED2_PIN  5
#define LED3_PIN  6

uint8_t highPowerLEDs[] = { LED1_PIN, LED2_PIN, LED3_PIN };
bool highPowerOnState[] = { false, false, true };

// Tuned for proximity sensor
#define TOUCH_THRESHOLD   50
#define	RELEASE_THRESHOLD 30

// I2C pins:
// SDA - A4
// SCL - A5

TouchSensor touch(TOUCH_SENSOR_PIN);

// How many panels are attached to the Arduino?
#define STRIP_LEDS  10
CRGB leds[STRIP_LEDS];
Pixel pixels[STRIP_LEDS] = {
  Pixel(5, 0),
  Pixel(5, 1),
  Pixel(5, 2),
  Pixel(5, 3),
  Pixel(3, 0),
  Pixel(3, 1),
  Pixel(3, 2),
  Pixel(3, 3),
  Pixel(3, 4),
  Pixel(3, 5),
};
LEDStrip<SPI_DATA, SPI_CLOCK> strip(STRIP_LEDS, leds, pixels);

void setup()
{ 
  Serial.begin(115200);

  setupCommands();
  resetInterface(DEBUG_MODE);
}

void initInterface() {
}

// Reset everything to initial state
void resetInterface(bool debug)
{
  touch.setup();
  for (int i=0;i<LEDStripInterface::getNumStrips();i++) LEDStripInterface::getStrip(i).setup();
  LEDStripInterface::setAllColors(BLACK);
<commit_msg>Updated to actually built hardware<commit_after>// Yes, this is actually -*-c++-*-

/*!
  This sketch is responsible for the Handshake interactions


  Example commands:
HANDSHAKE 1 0
HANDSHAKE 1 1
HANDSHAKE 1 2

PANEL-SET 5 0 100 user0 easein
PANEL-SET 5 1 100 user1 easein
PANEL-SET 5 2 100 user2 easein
//PANEL-SET 5 3 100 white easein
PANEL-PULSE 5 3 100 white sleep
PANEL-SET 6 0 100 user0
PANEL-SET 6 1 100 user0
PANEL-SET 6 2 100 user0

PANEL-SET 3 0 100 user0 easein
PANEL-SET 3 1 100 user1 easein
PANEL-SET 3 2 100 user2 easein
PANEL-SET 3 3 100 succedss easein
PANEL-SET 3 4 100 error easein
PANEL-SET 3 5 100 white easein

*/

#include "HandshakeInterface.h"
#include <Wire.h> // Needed to make Arduino add the corresponding include path
#include "TouchSensor.h"
#include "Pixel.h"
#include "LEDStrip.h"
#include "anyware_serial.h"

// Set to 1 to start in debug mode
#define DEBUG_MODE 1

#define TOUCH_SENSOR_PIN  31
#define VIB_PIN  11
#define LED1_PIN  8
#define LED2_PIN  9
#define LED3_PIN  10

uint8_t highPowerLEDs[] = { LED1_PIN, LED2_PIN, LED3_PIN };
bool highPowerOnState[] = { false, false, false };

// Tuned for proximity sensor
#define TOUCH_THRESHOLD   50
#define	RELEASE_THRESHOLD 30

// I2C pins:
// SDA - A4
// SCL - A5

TouchSensor touch(TOUCH_SENSOR_PIN);

// How many panels are attached to the Arduino?
#define STRIP_LEDS  4
CRGB leds[STRIP_LEDS];
Pixel pixels[STRIP_LEDS] = {
  Pixel(5, 0),
  Pixel(5, 1),
  Pixel(5, 2),
  Pixel(5, 3),
};
LEDStrip<SPI_DATA, SPI_CLOCK> strip(STRIP_LEDS, leds, pixels);

void setup()
{ 
  Serial.begin(115200);

  setupCommands();
  resetInterface(DEBUG_MODE);
}

void initInterface() {
}

// Reset everything to initial state
void resetInterface(bool debug)
{
  touch.setup();
  for (int i=0;i<LEDStripInterface::getNumStrips();i++) LEDStripInterface::getStrip(i).setup();
  LEDStripInterface::setAllColors(BLACK);

{'fraction_non_alphanumeric': 0.10594989561586639, 'fraction_numerical': 0.06784968684759916, 'mean_word_length': 4.14496644295302, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '972096', 'n_tokens_mistral': 1687, 'n_tokens_neox': 1482, 'n_words': 476}