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 UIKit | |
class ViewController: UIViewController { | |
var countNum = 0 | |
var timerRunning = false | |
var timer = Timer() | |
@objc func updateDisplay(){ | |
countNum += 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
import numpy as np | |
import matplotlib.pyplot as plt | |
numbers = [num if num < 10 else 10 for num in np.linspace(1,13,13)] | |
cards = numbers*4 | |
print("distributeed card are...") | |
first,second = int(input()),int(input()) | |
print("Dealer's card is...") | |
DealerFirst = int(input()) |
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 <Servo.h> | |
#include <IRremote.h> | |
Servo servo_obj; // create servo object to control a servo | |
int control_put = 0; | |
int infrared = 10; | |
int position; | |
long plus = 0xFFA857; |
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 <Servo.h> | |
#include <IRremote.h> | |
Servo servo_obj; // create servo object to control a servo | |
int control_put = 0; // define A0 port to receive control signal from potentiometer | |
int position; // variable to read the value from the analog pin | |
int infrared = 10; //remote digital pin | |
long plus = 0xFFA857; | |
long minus = 0xFFE01F; |
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 <IRremote.h> | |
int input_pin = 10; //set D10 as input signal pin | |
const int GLED = 11; | |
const int YLED = 9; | |
const int RLED = 8; | |
IRrecv irrecv(input_pin); | |
decode_results signals; | |
int test = 0; |
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 <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27,16,2); | |
const int CDS = 0; | |
const int led = 3; | |
const int tilt_port = 1; | |
String first_message = ""; |
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 <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27,16,2); | |
const int CDS = 0; | |
const int threshold_cds = 200; | |
int val = 0; | |
String first_message = ""; | |
String second_message = "the light."; |
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
const int CDSOUT = 1; | |
const int LED = 13; | |
const int threshold_cds = 200; | |
int val = 0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(LED, OUTPUT); | |
} |
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
const int CDSOUT = 1; | |
int val = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
val = analogRead(CDSOUT); | |
Serial.write(byte(val/4)); |
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 processing.serial.*; | |
Serial port; | |
int y0 = 200; | |
boolean draw_flag = true; | |
int t = 0; | |
int data; | |
void draw_axis() { |
NewerOlder