This file contains hidden or 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/env python3 | |
# -*- coding: utf8 -*- | |
# | |
# Copyright 2018 Daniel Perron | |
# | |
# Base on Mario Gomez <[email protected]> MFRC522-Python | |
# | |
# This file use part of MFRC522-Python | |
# MFRC522-Python is a simple Python implementation for | |
# the MFRC522 NFC Card Reader for the Raspberry Pi. |
This file contains hidden or 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<stdio.h> | |
#include<conio.h> | |
#include<stdlib.h> | |
int main(){ | |
int game_status=0; | |
int age=0; | |
int number=0; | |
printf("\t______welcome to our lottery game______\n\n"); |
This file contains hidden or 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
//library link https://www.arduinolibraries.info/libraries/simple-dht | |
#include <DHT.h>; | |
#define DHTPIN 2 | |
#define DHTTYPE DHT22 | |
DHT dht(DHTPIN, DHTTYPE); | |
float hum; | |
float temp; | |
void setup() | |
{ | |
Serial.begin(9600); |
This file contains hidden or 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
var serialport=require("serialport"); | |
console.log("hi"); | |
var port=new serialport('/dev/ttyACM0',{ | |
baudRate:9600 | |
}); | |
const Readline=serialport.parsers.Readline; | |
const parser=new Readline(); | |
port.pipe(parser); | |
port.on('open',onPortOpen); |
This file contains hidden or 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 express=require('express') | |
const app=express(); | |
const Joi=require('joi') | |
app.use(express.json()) | |
const courses=[ | |
{id:1,name:'course1'}, | |
{id:2,name:'course2'}, | |
{id:3,name:'course3'}, | |
]; |
This file contains hidden or 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 RPi.GPIO as GPIO | |
import time | |
GPIO.setwarnings(False) | |
GPIO.cleanup() | |
GPIO.setmode(GPIO.BCM) | |
TRIG = 4 | |
ECHO = 18 |
This file contains hidden or 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 RPi.GPIO as GPIO | |
import time | |
GPIO.setwarnings(False) | |
GPIO.cleanup() | |
GPIO.setmode(GPIO.BCM) | |
TRIG = 4 | |
ECHO = 18 | |
GREEN = 17 |
This file contains hidden or 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 smbus | |
import time | |
import Adafruit_DHT | |
import RPi.GPIO as GPIO | |
#define GPIO 14 as DHT11 data pin | |
DHT_SENSOR = Adafruit_DHT.DHT22 | |
Temp_sensor=14 | |
# Define some device parameters |
This file contains hidden or 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 | |
########################################################################### | |
#Filename :i2c1602_lcd.py | |
#Description :test i2c 1602 lcd | |
#Author :alan | |
#Website :www.osoyoo.com | |
#Update :2017/07/02 | |
############################################################################ | |
import smbus | |
import time |
This file contains hidden or 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
//creating collection | |
====================== | |
var MongoClient = require('mongodb').MongoClient; | |
var url = "mongodb://localhost:27017/"; | |
MongoClient.connect(url, function(err, db) { | |
if (err) throw err; | |
var dbo = db.db("mydb"); | |
dbo.createCollection("customers", function(err, res) { |