This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stm32f2xx_rcc.h> | |
#include <stm32f2xx_tim.h> | |
#include <stm32f2xx_gpio.h> | |
#include <stm32f2xx_usart.h> | |
#include <stm32f2xx_i2c.h> | |
#include <stm32f2xx_dcmi.h> | |
#include <stm32f2xx_dma.h> | |
#include <misc.h> | |
//Clock Configuration | |
#define CLKPIN GPIO_Pin_8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import Tkinter as tk | |
import socket | |
UDP_IP = "192.168.1.254" | |
UDP_PORT = 5555 | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define F_CPU 1000000 | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <avr/pgmspace.h> | |
#include <avr/sleep.h> | |
#include <util/twi.h> | |
#include <util/delay.h> | |
#include <avr/cpufunc.h> | |
void init(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gamepad.c */ | |
/* Author: John King */ | |
/* You are allowed to freely modify and distribute this code, but please do tell me if you find anything interesting!*/ | |
#include<netdb.h> | |
#include<netinet/in.h> | |
#include<arpa/inet.h> | |
#include<sys/time.h> | |
#include<sys/types.h> | |
#include<sys/socket.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This code detects the sound produced in your environment and checks it with a threshold | |
//If the amplitude sound in your environment crosses a threshold then an alarm is sounded (VLC is made to play a music file) | |
//Else nothing is done. | |
// | |
//Compile as: | |
//gcc -o mincap mincap.c -lasound | |
#include <stdio.h> | |
#include <string.h> | |
#include <alsa/asoundlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Source: http://home.roadrunner.com/~jgglatt/tech/linuxapi.htm | |
//This example lists all of the digital audio input and output | |
//hardware (ie, ALSA pcm) ports upon all sound cards | |
//in the system. | |
// | |
//Compile as: | |
//gcc -o listpcm listpcm.c -lasound | |
#include <stdio.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Source: http://home.roadrunner.com/~jgglatt/tech/linuxapi.htm | |
//cardnames.c | |
//Lists the names of all sound cards in the system. | |
// | |
//Compile as: | |
//gcc -o cardnames cardnames.c -lasound | |
#include <stdio.h> | |
#include <string.h> | |
#include <alsa/asoundlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Credits MIKEOS http://http://mikeos.berlios.de | |
BITS 16 | |
start: | |
cli ; Clear interrupts | |
mov ax, 0 | |
mov ss, ax ; Set stack segment and pointer | |
mov sp, 0FFFFh | |
sti ; Restore interrupts | |
cld ; The default direction for string operations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Credits MIKEOS http://http://mikeos.berlios.de | |
BITS 16 | |
jmp short bootloader_start ; Jump past disk description section | |
nop ; Pad out before disk description | |
; ------------------------------------------------------------------ | |
; Disk description table, to make it a valid floppy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc hello.c -o hello `pkg-config --cflags --libs opencv` | |
sudo ./hello |
NewerOlder