Nathan Petersen
Published © CERN-OHL

Gradled Mini: Modular Discrete LED Display

A prototype low-cost, tileable, single-color LED matrix with low power consumption and scalable to large displays.

IntermediateFull instructions provided5 hours305
Gradled Mini: Modular Discrete LED Display

Things used in this project

Hardware components

EFM32TG110F32
×1
CP2102N
×1
STP08DP05
×1
HCF4094
×1

Story

Read more

Schematics

Gradled Mini Design Files

Schematics and PCB design

Code

Gradled Mini: main.c file

C/C++
Main code that runs device. Includes task which creates animation.
#include "em_chip.h"
#include "drv_clock.h"
#include "drv_status_led.h"
#include "display.h"
#include "graphics.h"
#include "scheduler.h"

uint8_t sts_on = 0;
void blink_task(void)
{
	if (sts_on == 1) {
		drv_status_led_on();
	} else {
		drv_status_led_off();
	}

	sts_on = 1 - sts_on;
}

uint8_t step = 0;
void animate_task(void)
{
	graphics_draw_rect(step, step, 8-(2*step), 8-(2*step), 1);
	step++;

	if (step > 4) {
		// start over
		step = 0;
		graphics_fill_screen(0);
	}
}

int main(void)
{
	// Chip errata
	CHIP_Init();

	drv_clock_init();
	drv_status_led_init();
	drv_status_led_off();

	scheduler_init();

	scheduler_register_task(blink_task, 500);
	scheduler_register_task(animate_task, 333);

	display_init();

	scheduler_run();
}

Credits

Nathan Petersen

Nathan Petersen

3 projects • 0 followers
Current student in Computer Science with an emphasis on Embedded Systems at UW-Madison. Read about my personal projects: nathanpetersen.com

Comments