View main.py
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) |
View pitches.h
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 |
View main.py
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) |
View main.py
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) |
View segment.py
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) |
View AD9833_ver1.ino
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; |
View LED_blink_by_ArtyS7.v
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; |
View matplolib_realtime_gui.py
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 |
View matplolib_realtime_ui.py
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
# -*- coding: utf-8 -*- | |
# Form implementation generated from reading ui file 'matplo_realtime.ui' | |
# | |
# Created by: PyQt5 UI code generator 5.11.3 | |
# | |
# WARNING! All changes made in this file will be lost! | |
from PyQt5 import QtCore, QtGui, QtWidgets |
View matplo_gui.py
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 | |
from matplo_ui import Ui_Form | |
#below import libraries about matplotlib runing on pyqt5 | |
import matplotlib | |
#Make sure that we are using QT5 | |
matplotlib.use('Qt5Agg') | |
from PyQt5 import QtCore, QtWidgets | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas |
NewerOlder