|
去年申請的gokit2的arduino底板其實就是個完整的arduino板子,其實可以玩很多東西,一直想要個漂亮的示波器,終于找到這個,看下面的網址:
www點instructables點com/id/Oscilloscope-Arduino-Processing/
這個介紹的很詳細,簡單的說就是給板子燒錄程序,然后用A0,A1,A2,A3四個模擬口檢測信號,得到的數據通過串口傳給電腦,上位機軟件展示4路波形,還能量波形。上位機軟件做的很漂亮,但不是英文的,自己摸索一下,很簡單,有WIN32、64和linux版?上]有MAC的。
Download and unzip the Processing program to run on the computer. Choose the correct one below:- - windows 32
- - windows 64
- - linux 32
我用小黑板給語音板子發指令,是二線模式,總是不知道問題在哪兒,后來用了這個測試,輕松找到了問題。
gokit2的arduino底板用的是ch340的USB轉串口驅動,裝好后,arduino選UNO板子,下載程序就好,一個字都不用改。
- You already have the oscilloscope program running and the Arduino connected to the computer by USB port. Now you have to connect to each other by "serial".
- In the "Configurar a serial" (Configure the Serial) box, click "Serial" until theCOMwhere the Arduino is connected appears.(if it did not appear, click " * " to update)
- Click "off" to switch to "on"
If everything is correct, the oscilloscope will do a first reading showing the noises because the channels A0 (ch-0), A1 (ch-1), A2 (ch-2) and A3 (ch-3) are not connected to any signal. - In the "Amostragem" (Sampling) box, click "varias" (various) so that the reading is continuous.
程序源碼在這里:https://github.com/rogeriobego/o ... loscope_arduino.ino
只是有一個問題,這個程序里用了一個庫文件,不是arduino本身自己帶的。我找到了,回復可以下載附件,
解壓到arduino 的 librarise目錄即可編譯成功。對了,gokit2要拔掉擴展板才能燒錄底板。
230250tx5y47y8xkhkj7xz.jpg (120.66 KB, 下載次數: 212)
下載附件
2017-5-12 16:20 上傳
230251s9hs0a7s075od59e.jpg (70.49 KB, 下載次數: 240)
下載附件
2017-5-12 16:20 上傳
230252lgxq99u9xczu7krp.jpg (157.06 KB, 下載次數: 205)
下載附件
2017-5-12 16:20 上傳
230252n0w4ry0nd3g4evm5.jpg (119.05 KB, 下載次數: 229)
下載附件
2017-5-12 16:20 上傳
|
|