<commit_before>/*
 * Ws2811Rings.c
 *
 * Created: 16/08/2013 6:52:11 PM
 *  Author: mccubbinaj
 */ 


#include <avr/io.h>
#include "ws2811_8.h"
#include "chasers.h"

rgb buffer[] =
 {
	{40,40,40}, {0,40,0}, {40,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
 };

rgb Green = {40, 0, 0};
rgb Red	  = {0, 40, 0};
rgb Blue  = {0, 0, 40};
	
int main(void)
{
	memset(buffer, 0, sizeof(uint8_t) * 60 * 3);

	DDRB = _BV(3);
	
	RingSet rings(buffer, 15);
	Chaser chasers[3] = {
		Chaser(0, 0, Red),
		Chaser(2, 0, Green),
		Chaser(3, 0, Blue)
	};
	ChasePattern chasePattern(&rings, chasers, 3);
	
    while(1)
    {
		chasePattern.Update();

		// Update the display
		send( buffer, 60, 3);
    }
}<commit_msg>20ms delay<commit_after>/*
 * Ws2811Rings.c
 *
 * Created: 16/08/2013 6:52:11 PM
 *  Author: mccubbinaj
 */ 

#define F_CPU 8000000UL  // 8 MHz

#include <util/delay.h>

#include <avr/io.h>
#include "ws2811_8.h"
#include "chasers.h"

rgb buffer[] =
 {
	{40,40,40}, {0,40,0}, {40,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
	{0,0,10}, {0,10,0}, {10,0,0},
 };

rgb Green = {40, 0, 0};
rgb Red	  = {0, 40, 0};
rgb Blue  = {0, 0, 40};
	
int main(void)
{
	memset(buffer, 0, sizeof(uint8_t) * 60 * 3);

	DDRB = _BV(3);
	
	RingSet rings(buffer, 15);
	Chaser chasers[3] = {
		Chaser(0, 0, Red),
		Chaser(2, 0, Green),
		Chaser(3, 0, Blue)
	};
	ChasePattern chasePattern(&rings, chasers, 3);
	
    while(1)
    {
		_delay_ms(20);

		chasePattern.Update();

		// Update the display
		send( buffer, 60, 3);
    }
}
{'fraction_non_alphanumeric': 0.3285381026438569, 'fraction_numerical': 0.23483670295489892, 'mean_word_length': 4.272540983606557, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6583028', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1513, 'n_words': 263}