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
////////////////// Driver to generate musical tones ///////////////////// | |
//// //// | |
//// generate_tone(frequency, duration) Generates wave at set //// | |
//// frequency (Hz) for set //// | |
//// duration (ms) //// | |
////source:https://www.ccsinfo.com/forum/viewtopic.php?t=25649 //// | |
///////////////////////////////////////////////////////////////////////// | |
//// (C) Copyright 1996,2003 Custom Computer Services //// | |
//// This source code may only be used by licensed users of the CCS //// |
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
package fypsol.guiexamples.ex01; | |
import java.awt.FlowLayout; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JOptionPane; |
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<iostream> | |
using namespace std; | |
int val=23; | |
void intToBin(int var,int bitCount); | |
int main() | |
{ | |
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
/* | |
* LCD commands HD44780 (as per datasheet) | |
*/ | |
#define LCD_CLEAR_DISPLAY 0x01 ///< Clear the display and set DDRAM address to 0 | |
#define LCD_HOME 0x02 ///< Set DDRAM to 0, cancels any shifts | |
#define LCD_ENTRY_MODE 0x04 ///< Sets cursor move direction and specifies display shift | |
#define LCD_INCREMENT 0x02 ///< Increments (1) or decrements (0) DDRAM address by 1 when data is written or read from DDRAM @see LCD_ENTRY_MODE | |
#define LCD_SHIFT_LEFT 0x01 ///< Shifts the entire display (1) in direction specified by ID bit when writing to DDRAM - display moves, not cursor. @see LCD_ENTRY_MODE | |
#define LCD_DISPLAY_ON_OFF 0x08 ///< Sets display on/off, cursor on/off and blinking of cursor | |
#define LCD_DISPLAY_ON 0x04 ///< Display on/off bit @see LCD_DISPLAY_ON_OFF |
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
import pyaudio | |
import wave | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 | |
CHUNK = 1024 | |
RECORD_SECONDS = 5 | |
WAVE_OUTPUT_FILENAME = "file.wav" | |
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
/* Includes ------------------------------------------------------------------*/ | |
#include <stdio.h> | |
#include "stm32f4xx.h" | |
#include "stm32f4_discovery.h" | |
#include "stm32f4_discovery_lcd.h" | |
/* Private typedef -----------------------------------------------------------*/ | |
/* Private define ------------------------------------------------------------*/ |
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
%%================================================================== | |
% | |
% IN THE NAME OF ALLAH, | |
% | |
%simple 50hz filter, to remove line noise, implemented in iir band stop | |
%filter method is butter worth filter | |
%% | |
% Aquaire a Clean Workspace; |
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 <16F887.h> | |
#fuses HS,NOWDT,NOPROTECT,NOLVP | |
#use delay(crystal=4000000) | |
#define keypad_port PORTD | |
#define keypad_tris TRISD |
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
radix DEC | |
LIST P=16F887, F=INHX8M ; change also: Configure->SelectDevice from Mplab | |
; auto-start at 4MHz internal osc | |
xtal EQU 8000000 ; do not change those without manyally changing "spbrg_value" below | |
baud EQU 115200 ; | |
; The above 3 lines can be changed and buid a bootloader for the desired frequency (and PIC type) |
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
clear all; | |
close all; | |
clc; | |
%% initalize camera | |
vidDevice = imaq.VideoDevice('winvideo', 1, 'YUY2_320x240', ... % Acquire input video stream | |
'ROI', [1 1 320 240], ... | |
'ReturnedColorSpace', 'rgb'); |
NewerOlder