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 <Arduino.h> | |
#include<M5Core2.h> | |
#define buzzer_pin 26 | |
int freq = 4000;//音の高さ | |
int ledChannel = 0; | |
int resolution = 10; | |
int vol=512;//Volume 0-1024(10it) | |
int i,j,k; | |
int t0,tb,tw; | |
uint8_t flags; |
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
'Serial Port Recieve Sample Program | |
'Form1 Object must create ,button1,2 & textbox 1,2 | |
Imports System.IO.Ports | |
Imports System.Drawing | |
Public Class Form1 | |
Dim dArr(500000) As String | |
Dim arr1() As String |
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
Imports Microsoft.VisualBasic.FileIO | |
Imports System.Text | |
Imports System.IO | |
Imports System.Math | |
Imports ImagingSolution 'ImagingSolution.Matクラス用 | |
Public Class Form1 | |
'===================DataGridView ============== | |
Public dgv() As DataGridView |
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
'Serial Port Recieve Sample Program | |
'Form1 Object must create ,button1,2 & textbox 1,2 | |
Imports System.IO.Ports | |
Public Class Form1 | |
Dim relP As Double(,) | |
'Dim relPN As Double() | |
'Dim relPE As Double() |
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
'Serial Port Recieve Sample Program | |
'Form1 Object must create ,button1,2 & textbox 1,2 | |
Imports System.IO.Ports | |
Public Class Form1 | |
Dim dArr(500000) As String | |
Dim rn, rn_start, rn_pause As Integer | |
Dim sflag As Integer |
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 <M5Atom.h> | |
//----------------Texsus ADS122U04-------------------------- | |
int DRDY = 23; //DataRdy Pin 23 | |
double ft1, ft2; | |
int RREGwait; | |
int flipN; | |
uint8_t RR0, RR1, RR2, RR3, RR4; | |
uint8_t d0, d1, d2, d3, d4, d5, d6; | |
double data1ch, data2ch; |
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
//----------------Texsus ADS122U04-------------------------- | |
#include "mbed.h" | |
Serial pc(USBTX,USBRX); | |
Serial device(p9, p10);//p9TX p10RX | |
DigitalOut myled(LED1); | |
InterruptIn DRDY(p8);//DataRdy Pin | |
//DigitalIn DRDY(p8);//DataRdy Pin | |
Timer t; | |
double ft1,ft2; | |
int RREGwait; |
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
//----------------Texsus ADS122U04-------------------------- | |
#include "mbed.h" | |
Serial pc(USBTX,USBRX); | |
Serial device(p9, p10);//p9TX p10RX | |
DigitalOut myled(LED1); | |
InterruptIn DRDY(p8);//DataRdy Pin | |
Timer t; | |
int RREGwait; | |
uint8_t RR0,RR1,RR2,RR3,RR4; | |
int DRDYflag=0; |
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
void loop() { | |
if (Serial2.available()) | |
{ | |
digitalWrite(2, HIGH); | |
f1data[k] = Serial2.read(); | |
//Serial.print(f1data[k],HEX); | |
dumpflag=0; | |
if ( f1data[k] == 0xD3)// && f1data[k-4] == 0x00)// && f1data[k-2] == 0xFE && f1data[k-1] == 0x80 && f1data[k]==0x01) |
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
//HardwareSerial Serial2(2);//これは不要でいれるとエラーになる | |
#include <M5Stack.h> | |
void setup() { | |
// initialize both serial ports: | |
//Serial.begin(115200); | |
M5.begin();//この中でSerial(USB Serial)の115200宣言含む | |
//Serial2.begin(115200); | |
Serial1.begin(115200, SERIAL_8N1,2, 5);//GPIO2:RX ,GPIO5:TX | |
} |
NewerOlder