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; | |
clc; | |
% Given values | |
% To calculate W and L use this link: | |
% https://goo.gl/kYUHc3 | |
% W=11.86*10^-3; | |
% L=9.06*10^-3; | |
eps_r = 4.5; | |
fr = 2.4*10^9; | |
h = 1.6*10^(-3); |
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
# Welcome to Sonic Pi v3.1 | |
#jazzy | |
use_synth :pluck | |
use_bpm 100 | |
live_loop :picking do | |
# use_synth :pluck | |
sleep 0.5 | |
play chord(:c,:M7).choose, pan: 1 | |
sleep 0.5 | |
sleep 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
'''============================================ | |
For this tutorial, i'm gonna make a simple moving object | |
using pygame. This is based from the chimp tutorial on | |
pygame website | |
editor: Son Pham | |
date: 8/30/2018 | |
files: https://goo.gl/7he7kG | |
python 3.7.0 | |
==============================================''' | |
# import modules |
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
# Welcome to Sonic Pi v3.1 | |
# Romanza sheet is from Ukulele for Dummies | |
# Translate to Sonic Pi by Son Pham | |
# Keep learning and creating things! | |
# use in_thread to keep | |
#use_synth is for chosing your sound synthesizer, in this demonstration, | |
#I'm gonna use pluck which is guitar. | |
#use_bpm is for setting beat per minute for this piece of music. | |
#I'm gonna choose 90 which is recommended for Romanza | |
#I use in_thread to keep the next block run concurrently with the in_thread block. |
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 "pitches.h" | |
// Khai báo dãy nốt nhạc: | |
int melody[] = {NOTE_C7, NOTE_A7,NOTE_G7, NOTE_C7, NOTE_G7,0, NOTE_B7, NOTE_C7}; | |
// Cao độ của nốt: 4 = nốt đen, 8 = nốt móc, etc.: | |
int noteDurations[] = {4, 8, 8, 3,4,6,10,10 }; | |
void setup() { | |
// Chơi tất cả các nốt: | |
for (int thisNote = 0; thisNote < 8; thisNote++) { | |
/* Để tính cao độ, ta lấy 1 giây chia cho nốt VD: nốt đen = 1000 / 4, nốt móc = 1000/8,...*/ | |
int noteDuration = 1000/noteDurations[thisNote]; |
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
/*Example from book the C programing language | |
* by Brian W.Kernighan and Dennis M. Ritchie | |
*/ | |
#include <stdio.h> | |
int main(){ | |
int c, i, nwhite, nother, ndigit[10]; | |
nwhite = nother = 0; | |
//reset the array to 0 | |
for (i = 0; i < 10; i++) |
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 time | |
from datetime import date | |
#def count_time_left(): | |
today =date.today() | |
while True: | |
yourMonth = int(input("Enter your Month of birth MM: ")) | |
if yourMonth >12 or yourMonth < 0: | |
print('please try MM again!') |
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
//Thanks 4CORE and Jmarlins for helping me. | |
//NodeMCU.h to map the pin on the motor shield correctly | |
/* | |
static const uint8_t D0 = 16; | |
static const uint8_t D1 = 5; | |
static const uint8_t D2 = 4; | |
static const uint8_t D3 = 0; | |
static const uint8_t D4 = 2; | |
static const uint8_t D5 = 14; | |
static const uint8_t D6 = 12; |
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 to https://github.com/MajicDesigns/MD_MAX72XX | |
#include <ESP8266WiFi.h> | |
#include <MD_MAX72xx.h> | |
#include <SPI.h> | |
//Declare hardware | |
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW | |
#define MAX_DEVICES 4 | |
#define CLK_PIN 14 // or SCK |
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 to https://github.com/MajicDesigns/MD_MAX72XX | |
// Son Pham 10-17-2018 | |
// Project: Signal Board for Bikers | |
/********************************************************/ | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <MD_MAX72xx.h> |
OlderNewer