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
from linebot import LineBotApi | |
from linebot.models import TextSendMessage | |
from linebot.exceptions import LineBotApiError | |
import search | |
bot_api = '******' | |
user_id = '******' |
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 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") |
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 segment | |
import time | |
import utime | |
import machine | |
import math | |
sensor_temp = machine.ADC(4) | |
conversion_factor = 3.3/(65535) |
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
/************************************************* | |
* 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 |
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 segment | |
import time | |
j = 0 | |
while True: | |
print(j) | |
segment.C(j) | |
time.sleep(1) | |
segment.Coff() | |
time.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
import segment | |
import time | |
j = 0 | |
while True: | |
print(j) | |
segment.A(j) | |
time.sleep(1) | |
segment.Aoff() | |
time.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
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) |
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 <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; |
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
module top1( | |
input wire CLK100MHZ, | |
output wire [3:0] led | |
); | |
reg [28:0] counter; | |
reg LED_status; | |
initial begin | |
counter <= 28'b0; |
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 sys | |
from PyQt5 import QtWidgets | |
#matplo_realtime_ui.pyの読み込み | |
from matplo_realtime_ui import Ui_Form | |
#以下7~12はpyqt上でmatlaboを動かすのに必要なライブラリ | |
import matplotlib | |
matplotlib.use('Qt5Agg') | |
from PyQt5 import QtCore, QtWidgets | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas |
NewerOlder