Skip to content

Instantly share code, notes, and snippets.

View blakewrege's full-sized avatar

blake blakewrege

View GitHub Profile
@blakewrege
blakewrege / timer.c
Created December 11, 2014 04:01
counts on screen
#include <msp430.h>
#include <libemb/serial/serial.h>
#include <libemb/conio/conio.h>
#include <libemb/shell/shell.h>
int v=0;
int main()
{ WDTCTL = WDTPW | WDTHOLD;
BCSCTL1 = CALBC1_1MHZ; // the usual
DCOCTL = CALDCO_1MHZ; //
@blakewrege
blakewrege / bubbleloop.c
Created December 11, 2014 03:14
loops the numbers
#include <msp430.h>
int p1[4] = {
BIT5+BIT6+BIT7,
BIT4+BIT6+BIT7,
BIT4+BIT5+BIT7,
BIT4+BIT5+BIT6};
int p2[10]={
BIT2+BIT1+BIT3+BIT4+BIT5+BIT6, //0
BIT1+BIT5, //1
@blakewrege
blakewrege / lottery.c
Last active August 29, 2015 14:11
button interrupt broke
#include <msp430.h>
#include <libemb/serial/serial.h>
#include <libemb/conio/conio.h>
#include <libemb/shell/shell.h>
#define push (P1IN&BIT3)
int p1[4] = {
BIT5,BIT6,BIT7,
BIT4+BIT6+BIT7,
drop database lab3;
create database lab3;
use lab3;
create table addresses(
a_id integer auto_increment primary key,
street varchar(20),
zip varchar(9),
city varchar(40),
state char(2)
<html>
<body>
<?php
$servername = "localhost";
$username = "testuser";
$password = "test623";
$dbname = "lab2";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
#include <msp430.h>
.text
RESET mov.w #__STACK_END,SP
MOV #WDTPW+WDTHOLD, &WDTCTL
use lab;
create trigger test
before insert on class.fid
for each row
begin
from class
end;
// This program will convert unsigned int values for output in various bases
// including 2<= Base <= 16 and Base = 256
// There will be a Convert(Value, Base) routine called with hard coded values from main
// The Base = 256 case will be handled separately.
//
#include <stdio.h>
void Convert(unsigned int,unsigned int);
void DoOtherConvert(unsigned int);
int main()
#include <msp430.h>
#include <libemb/serial/serial.h>
#include <libemb/conio/conio.h>
#include <libemb/shell/shell.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
main(void){
WDTCTL = WDTPW | WDTHOLD;
BCSCTL1 = CALBC1_1MHZ;
SELECT student.standing,group_concat(student.age)
FROM lab.student
group by student.standing;