<commit_before>/*
* RGBTools
* Version 1.4 April, 2015
* Copyright 2015 <NAME>
* 
* Use this code with RGB-LEDs.
*/

#ifndef RGBTools_H
#define RGBTools_H

#include <Arduino.h>

enum Mode { COMMON_ANNODE, COMMON_CATHODE };

class RGBTools
{
	public:
		RGBTools(int r, int g, int b);
		RGBTools(int r, int g, int b, uint8_t common_cathode);
		RGBTools(int r, int g, int b, Mode mode);
		void setColor(int r, int g, int b);
		void setColor(uint32_t);
		void fadeTo(int r,int g,int b,int steps,int duration);
		
	private:
		// pins for colors
		int r_pin, g_pin, b_pin;

		// saves current state (color)
		int curr_r, curr_g, curr_b;

		// output for common cathode RGB leds (0 = dark)
		// default: common anode (0 = bright)
		uint8_t _common_cathode;

};

class Color {
  public:
    static const uint32_t RED = 0xFF0000;
    static const uint32_t GREEN = 0x00FF00;
    static const uint32_t BLUE = 0x0000FF;
};<commit_msg>Fixed spelling error in ANNODE<commit_after>/*
* RGBTools
* Version 1.4 April, 2015
* Copyright 2015 <NAME>
* 
* Use this code with RGB-LEDs.
*/

#ifndef RGBTools_H
#define RGBTools_H

#include <Arduino.h>

enum Mode { COMMON_ANODE, COMMON_CATHODE };

class RGBTools
{
	public:
		RGBTools(int r, int g, int b);
		RGBTools(int r, int g, int b, uint8_t common_cathode);
		RGBTools(int r, int g, int b, Mode mode);
		void setColor(int r, int g, int b);
		void setColor(uint32_t);
		void fadeTo(int r,int g,int b,int steps,int duration);
		
	private:
		// pins for colors
		int r_pin, g_pin, b_pin;

		// saves current state (color)
		int curr_r, curr_g, curr_b;

		// output for common cathode RGB leds (0 = dark)
		// default: common anode (0 = bright)
		uint8_t _common_cathode;

};

class Color {
  public:
    static const uint32_t RED = 0xFF0000;
    static const uint32_t GREEN = 0x00FF00;
    static const uint32_t BLUE = 0x0000FF;
};
{'fraction_non_alphanumeric': 0.1064516129032258, 'fraction_numerical': 0.03978494623655914, 'mean_word_length': 3.550122249388753, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4468857', 'n_tokens_mistral': 820, 'n_tokens_neox': 718, 'n_words': 232}