Neven Boyanov
Published © MIT

OWOWOD is One Wire / One Way Output for Debugging library

OWOWOD is One Wire / One Way Output for Debugging library. It allows you to output debugging text from the ATtiny85 microcontroller

IntermediateProtip641
OWOWOD is One Wire / One Way Output for Debugging library

Things used in this project

Hardware components

Tinusaur
×1
USB TTL Converter
×1

Story

Read more

Code

Code snippet #1

Plain text
debugging_print("working, x=%i", x);

Code snippet #2

Plain text
#include <stdlib.h>
#include <avr/io.h>
#define OWOWOD_PORT PB3 // OWOWOD Port
#include "../owowod/owowod.h"
int main(void) {
    owowod_init();
    owowod_print_char('U');
    owowod_print_string("Hello!\r\n");
    owowod_print_numdec(1);
    owowod_print_numdecp(2);
    owowod_print_numdecu(123);
    owowod_print_numdecup(456);
    return 0;
}

Code snippet #3

Plain text
    12
   345
 67890
    -2
   -34
-56789

Code snippet #4

Plain text
#define F_CPU 1000000UL
#include <stdint.h>
#include <avr/io.h>
#define OWOWOD_PORT PB3
#include "../owowod/owowod.h"
#include "../owowod/debugging.h"
int main(void) {
    DEBUGGING_INIT();
    DEBUGGING_NUMDEC(-123);
    DEBUGGING_NUMDECP(-4567);
    DEBUGGING_NUMDECU(123);
    DEBUGGING_NUMDECUP(4567);
    DEBUGGING_STRING("Hello!");
    DEBUGGING_STRINGLN("Hi!");
    DEBUGGING_VAR("X", 1);
    DEBUGGING_VARU("Y", 23);
    DEBUGGING_ERROR(4, "Connect");
    return 0;
}

Bitbucket

https://bitbucket.org/tinusaur/owowod

Credits

Neven Boyanov
8 projects • 9 followers
Computer programmer, entrepreneur and maker. Interested in science, technology and how things work. Lecturer in schools and universities.
Contact

Comments

Please log in or sign up to comment.