good.
https://www.cool3c.com/article/130219
2018年8月29日 星期三
2018年4月10日 星期二
[Python]Anaconda Python & Pycharm 安裝
Anaconda...good
不錯的文章
How To Install the Anaconda Python Distribution on Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-16-04
How To Install PyCharm In Ubuntu 14.04 and 16.04
不錯的文章
How To Install the Anaconda Python Distribution on Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-16-04
How To Install PyCharm In Ubuntu 14.04 and 16.04
https://itsfoss.com/install-pycharm-ubuntu/
2018年1月28日 星期日
[Arduino]Visual Studio 當作 Arduino IDE進行開發Arduino
不錯的文章:
https://dotblogs.com.tw/jason_wang/2016/01/02/visual-studio_for_arduino
2017年12月12日 星期二
[C#]使用Open XML SDK R/W excel
不錯的文章
GridView 匯出成 Excel (.xlsx) (使用 OpenXML SDK 2.5)
http://shaurong.blogspot.tw/2016/03/caspnet-gridview-excel-xlsx-openxml-sdk.html
ASP.NET Core 教學 - Open XML SDK 匯出 Excel =>有圖解示 sheets/workbook/worksheet/sheetdata
https://blog.johnwu.cc/article/asp-net-core-export-to-excel.html
GridView 匯出成 Excel (.xlsx) (使用 OpenXML SDK 2.5)
http://shaurong.blogspot.tw/2016/03/caspnet-gridview-excel-xlsx-openxml-sdk.html
ASP.NET Core 教學 - Open XML SDK 匯出 Excel =>有圖解示 sheets/workbook/worksheet/sheetdata
https://blog.johnwu.cc/article/asp-net-core-export-to-excel.html
How to create an Excel file in .NET using OpenXML
http://www.dispatchertimer.com/tutorial/how-to-create-an-excel-file-in-net-using-openxml-part-1-basics/
How to: Insert text into a cell in a spreadsheet document (Open XML SDK)
https://msdn.microsoft.com/zh-tw/library/office/cc861607.aspx
2017年12月1日 星期五
[arduino Mega2560]I2C 練習
看到文章說,最大只能傳送32 bytes,有看到說更改底層的define就可使用超過 32 bytes
而這邊是為了要讀取64 bytes因為是練習,所以就把他拆而兩次讀,重點是要了解其I2C R/W程式寫法:
參考:
https://www.arduino.cc/en/Reference/Wire
#include <Wire.h>
bool send_step1_ok_flag;
bool send_step2_ok_flag;
byte buffer[64];
byte buffer_count;
byte slave_address=0x55;
void setup()
{
Serial.begin(9600);
while(!Serial) ;
Serial.println("Serail port working...");
send_step1_ok_flag=false;
send_step2_ok_flag=false;
Wire.begin();
}
void I2C_cmd_send(byte start_address)
{
byte length=32;
Wire.beginTransmission(slave_address);
Wire.write(start_address);
Wire.endTransmission();
Wire.requestFrom(slave_address,length);
}
void loop()
{
if((!send_step1_ok_flag)&&(!send_step2_ok_flag))
{
Serial.println("Master Send I2C cmd");
send_step1_ok_flag=true;
I2C_cmd_send(0);
buffer_count=0;
}
else if((send_step1_ok_flag)&&(!send_step2_ok_flag))
{
if(buffer_count==32)
{
send_step2_ok_flag=true;
I2C_cmd_send(32);
}
}
else
{
Serial.println("Master Read finish");
for(byte i=0;i<64;i++)
{
Serial.print(buffer[i],HEX);
Serial.print(" ");
}
Serial.println();
send_step1_ok_flag=false;
send_step2_ok_flag=false;
delay(1000);
}
while(Wire.available())
{
buffer[buffer_count]=Wire.read();
buffer_count=buffer_count+1;
}
}
而這邊是為了要讀取64 bytes因為是練習,所以就把他拆而兩次讀,重點是要了解其I2C R/W程式寫法:
參考:
https://www.arduino.cc/en/Reference/Wire
#include <Wire.h>
bool send_step1_ok_flag;
bool send_step2_ok_flag;
byte buffer[64];
byte buffer_count;
byte slave_address=0x55;
void setup()
{
Serial.begin(9600);
while(!Serial) ;
Serial.println("Serail port working...");
send_step1_ok_flag=false;
send_step2_ok_flag=false;
Wire.begin();
}
void I2C_cmd_send(byte start_address)
{
byte length=32;
Wire.beginTransmission(slave_address);
Wire.write(start_address);
Wire.endTransmission();
Wire.requestFrom(slave_address,length);
}
void loop()
{
if((!send_step1_ok_flag)&&(!send_step2_ok_flag))
{
Serial.println("Master Send I2C cmd");
send_step1_ok_flag=true;
I2C_cmd_send(0);
buffer_count=0;
}
else if((send_step1_ok_flag)&&(!send_step2_ok_flag))
{
if(buffer_count==32)
{
send_step2_ok_flag=true;
I2C_cmd_send(32);
}
}
else
{
Serial.println("Master Read finish");
for(byte i=0;i<64;i++)
{
Serial.print(buffer[i],HEX);
Serial.print(" ");
}
Serial.println();
send_step1_ok_flag=false;
send_step2_ok_flag=false;
delay(1000);
}
while(Wire.available())
{
buffer[buffer_count]=Wire.read();
buffer_count=buffer_count+1;
}
}
2017年11月22日 星期三
[C#] async與await
看了之後,終於有點了解
async & await 的前世今生
http://www.cnblogs.com/jesse2013/p/async-and-await.html
async & await 的前世今生
http://www.cnblogs.com/jesse2013/p/async-and-await.html
2017年11月2日 星期四
[LinkIt One]Bluebooth SPP 連線&傳輸
網路上找的小程式
#include <LBT.h>
#include <LBTServer.h>
#define btName "BT_SPP"
int i=0;
void setup() {
// put your setup code here, to run once:
Serial.begin( 9600 );
while(!Serial);
pinMode(13,OUTPUT);
if(!LBTServer.begin((uint8_t*)btName))
{
Serial.print("Fail to start BT\n");
return;
}
Serial.print("BT server is started\n");
for(int i=0;i<3;i++)
{
digitalWrite(13,HIGH);
delay(300);
digitalWrite(13,LOW);
delay(300);
}
}
void loop() {
// put your main code here, to run repeatedly:
uint8_t buf[64];
int bytesRead;
if(LBTServer.connected())
{
bytesRead = LBTServer.readBytes(buf, 1);
if(bytesRead)
{
Serial.printf("RECV
DATA:%x\n",buf[0]);
}
else
{
Serial.print("Connected\n");
}
}
else
{
Serial.printf("Not connected:%d\n",i++);
LBTServer.accept(5);
}
將之前的 PC程式,修改client 端:
//PC write
buffer[0] = 0x05;
perStream.Write(buffer, 0, 1);
感動勒....有通聯
訂閱:
文章 (Atom)