Skip to content

Instantly share code, notes, and snippets.

@jotux
jotux / dirty_array.cpp
Last active November 21, 2018 21:30
C++ array access with automatic dirty flag set.
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
using namespace std;
template<uint8_t N>
class Register
{
@jotux
jotux / cmmi_path.md
Created September 20, 2014 17:25
CMMI path

Managed Development (CMMI Level 2)

Configuration Management (CM)

"Are all documentation, test and code artifacts are under version management, and carry a unique version number, save date, and revision history statement?"

Purpose

Establish and maintain the integrity of work products using configuration identification, configuration control, configuration status accounting, and configuration audits.

@jotux
jotux / gist:b8d7edee3e634da20353
Created July 27, 2014 03:32
lnk_msp430fr5969.cmd
MEMORY
{
SFR : origin = 0x0000, length = 0x0010
PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
RAM : origin = 0x1C00, length = 0x0800
INFOA : origin = 0x1980, length = 0x0080
INFOB : origin = 0x1900, length = 0x0080
INFOC : origin = 0x1880, length = 0x0080
INFOD : origin = 0x1800, length = 0x0080
@jotux
jotux / gist:2f7d51acf920e22f0dcf
Created July 27, 2014 03:27
fram_hibernate.c
#include <msp430.h>
#include <stdint.h>
#include <stddef.h>
#include "hw.h"
#include "hardware_init.h"
#define RAM_LOC 0x1C00
#define RAM_SIZE 0x800
#define SFR_LOC 0x0200
#define SFR_SIZE 0x013F
@jotux
jotux / pointers.c
Created June 4, 2014 17:43
Pointer explanation
#define ADDRESS_OF(var) &(var)
#define VALUE_AT(var) *(var)
#define POINTER_TO(type) type*
main()
{
int foo[3] = {10,20,30};
POINTER_TO(int) bar = ADDRESS_OF(foo);
printf("address of foo : 0x%8x\n",ADDRESS_OF(foo[0]));
@jotux
jotux / ws2801.c
Last active January 3, 2016 04:59
Bit-banged ws2801 arduino driver
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// __ __________ _____ __ _
// / / / ____/ __ \ / ___// /______(_)___
// / / / __/ / / / / \__ \/ __/ ___/ / __ \
// / /___/ /___/ /_/ / ___/ / /_/ / / / /_/ /
// /_____/_____/_____/ /____/\__/_/ /_/ .___/
// /_/
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// Data and clock pin locations on the arduino
#define DATA 20

Spirit of the Contest

  • Build an autonomous robot with an aiming mechanism and a laser
  • Write software for the robot to accurately aim and shoot the laser at moving and illuminated targets

Robots that go against the spirit of the contest will be disqualified. Examples of this would be a robot that randomly sweeps the laser across the Arena or is secretly remote controlled.

Robot

Physical

@jotux
jotux / test1.c
Last active April 14, 2023 20:32
Embedded C Interview Questions
// What is the expected output?
main()
{
int a;
int b;
for (a = 0,b = 0;a < 10,b < 5;a++,b++)
{
printf("%d %d\n",a,b);
}
return 0;