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 <stdio.h> | |
#include <stdlib.h> | |
// 宣告節點結構 | |
typedef struct nodestruct{ | |
int data; | |
struct nodestruct* next; | |
} node; | |
// 宣告相關函式 |
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 <stdio.h> | |
#include <stdlib.h> | |
// 宣告節點結構 | |
typedef struct nodestruct{ | |
int data; | |
struct nodestruct* next; | |
} node; | |
// 宣告相關函式 |
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
/* | |
Blue_ATCommand | |
DATA:20150423 | |
Ver3:20150425_12 | |
NAME:Charlotte.HonG | |
*/ | |
#include <SoftwareSerial.h> | |
#include "Timer.h" | |
#define BT_RX 2 | |
#define BT_TX 3 |
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 <SoftwareSerial.h> | |
#include <Wire.h> | |
#define BTTX 2 | |
#define BTRX 3 | |
#define Led 13 | |
byte serialA; | |
SoftwareSerial I2CBT(BTTX,BTRX); | |
void CtrlLED(char str[128]); | |
/*================================================*/ | |
void setup(){ |
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 serial | |
import os | |
os.system("sudo chmod 666 /dev/ttyAMA0") | |
Uart = serial.Serial("/dev/ttyAMA0", baudrate = 38400, timeout = 1) | |
Uart.write("Pi UART is already.") | |
print("Pi UART is already.") | |
while True: | |
UartSTR = Uart.readline() |
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 <SoftwareSerial.h> | |
#include <Wire.h> | |
#define UartRX 2 | |
#define UartTX 3 | |
#define Led 13 | |
SoftwareSerial I2CBT(UartRX ,UartTX ); | |
void CtrlLED(char str[128]); | |
/*================================================*/ | |
void setup(){ |
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 <SoftwareSerial.h> | |
#include <Wire.h> | |
#define Uart_Tx 2 | |
#define Uart_Rx 3 | |
#define Led 13 | |
SoftwareSerial Uart(Uart_Tx,Uart_Rx); | |
char str[32]=""; | |
/*================================================*/ | |
void setup(){ |
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
/********************************************************** | |
Name:String Split | |
DATE:2016/03/31 | |
By CharlotteHong | |
**********************************************************/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.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
/********************************************************** | |
Name:String Split Arduino | |
DATE:2016/03/31 | |
By CharlotteHong | |
**********************************************************/ | |
#define led 13 | |
/* 切割字串 (要切割的字串,切割的符號) | |
字串的格式如 srt[]="1,2"; | |
回傳值為一陣列起始值0為陣列長度 */ | |
int* str_split(const char* str, const char* sp); |
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
/********************************************************** | |
Name:String Split | |
DATE:2016/04/01 | |
By CharlotteHong | |
**********************************************************/ | |
#include <stdio.h> | |
#include <iostream> | |
using namespace std; | |
/* ================================================== */ | |
/* 切割字串 (要切割的字串,切割的符號) |
OlderNewer