Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<link href="css/style.css" rel="stylesheet">
<title>QR code generator</title>
</head>
<body>
<header>
<h1>QR code generator</h1>
</header>
<div id="wrap">
from linebot import LineBotApi
from linebot.models import TextSendMessage
from linebot.exceptions import LineBotApiError
import search
bot_api = '******'
user_id = '******'
import requests
from bs4 import BeautifulSoup
class switch_s:
def __init__(self):
global soup
url = "https://www.switch-science.com/products/8522"
r = requests.get(url)
soup = BeautifulSoup(r.content,"html.parser")
import segment
import time
import utime
import machine
import math
sensor_temp = machine.ADC(4)
conversion_factor = 3.3/(65535)
/*************************************************
* Public Constants
*************************************************/
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
import segment
import time
j = 0
while True:
print(j)
segment.C(j)
time.sleep(1)
segment.Coff()
time.sleep(1)
from machine import Pin
#Cathode common segment pin set up
led1 = Pin(0, Pin.OUT)
led2 = Pin(1,Pin.OUT)
led4 = Pin(2,Pin.OUT)
led6 = Pin(3,Pin.OUT)
led7 = Pin(4,Pin.OUT)
led9 = Pin(5,Pin.OUT)
led10 = Pin(6,Pin.OUT)
@ugeugeHigh
ugeugeHigh / main.py
Last active February 13, 2022 03:38
import segment
import time
j = 0
while True:
print(j)
segment.A(j)
time.sleep(1)
segment.Aoff()
time.sleep(1)
#include <SPI.h>
const int SINE = 0x2000;
const int SQUARE = 0x2028;
const int TRAIANGLE = 0x2002;
const float refFreq = 25000000.0;
const int FSYNC = 10;
const int SWpin = 4;
int waveType = TRAIANGLE;