Skip to content

Instantly share code, notes, and snippets.

import UIKit
class ViewController: UIViewController {
var countNum = 0
var timerRunning = false
var timer = Timer()
@objc func updateDisplay(){
countNum += 1
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())
#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;
#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;
#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;
#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 = "";
#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.";
const int CDSOUT = 1;
const int LED = 13;
const int threshold_cds = 200;
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
const int CDSOUT = 1;
int val = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
val = analogRead(CDSOUT);
Serial.write(byte(val/4));
import processing.serial.*;
Serial port;
int y0 = 200;
boolean draw_flag = true;
int t = 0;
int data;
void draw_axis() {