google-sheet2Html

/*! * * Google Sheets To HTML v0.9a * * To use, simply replace the "tq?key=" value in the * URL below with your own unique Google document ID * * The Google document's sharing must be set to public * */ google.load('visualization', '1', { packages: ['table'] }); var visualization; function drawVisualization() { var query = new google.visualization.Query('https://spreadsheets.google.com/tq?key=https://docs.google.com/spreadsheets/d/1-vUEZ9tae5C_OXzSi0dQPWwUrO3H5S-gImB5afFgqDg/edit?usp=sharing'); query.setQuery('SELECT A, B, C, D label A "Duration", B "Song", C "Requested By", D "URL"'); query.send(handleQueryResponse); } function handleQueryResponse(response) { if (response.isError()) { alert('There was a problem with your query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); visualization = new google.visualization.Table(document.getElementById('table')); visualization.draw(data, { legend: 'bottom' }); } google.setOnLoadCallback(drawVisualization);
Showing posts with label Pololu. Show all posts
Showing posts with label Pololu. Show all posts

Wednesday, November 22, 2017

Install Servo Controller Pololu บน Linux



  ติดตั้ง Pololu Maestro Control Center บน Linux






สำหรับผู้ใช้ Linux ให้ไป download และติดตั้งที่  

https://www.pololu.com/product/1350/resources

ในขณะเขียนบทความ (20 พย 2560) ชื่อไฟล์ที download ได้คือ maestro-linux-150116.tar.gz

เมื่อได้ไฟล์มาแล้ว ให้แตกไฟล์ออก ผู้เขียนแตกไฟล์ ที่ Downloads ได้แฟ้มชื่อ maestro-linux


ในfile README.txt  แจ้งว่าการติดตั้งในระบบ ต้องมี่ package ดังนี้

libusb-1.0-0-dev mono-runtime libmono-winforms2.0-cil 


เมื่อทำการติดตั้งโดยใช้คำสั่ง ตามเอกสารใน README.txt 

 $ sudo apt-get install libusb-1.0-0-dev mono-runtime libmono-winforms2.0-cil

จะเกิด error ดังในภาพ


 


คือไม่สามารถหา package ชื่อ libmono-winforms2.0-cil ให้ทำการแก้ไขโดยติดตั้ง mono-reference-assemblies-2.0 mono-devel ทดแทน
ให้ทำการแก้ไขโดยติดตั้งด้วยคำสั่ง

$ sudo apt-get install libusb-1.0-0-dev mono-runtime mono-reference-assemblies-2.0 mono-devel

  
ก็จะทำการติดตั้งได้ ขั้นต่อไป ในTerminal ให้ใช้คำสั่ง cd ไปยังตำแหน่งที่แตกไฟล์ในตัวอย่างแตกไฟล์ที่ Downloads ให้พิมพ์คำสั่ง 

$ cd Downloads/maestro-linux 

 
จะพบไฟล์ชื่อ 99-pololu.rules เพื่อใช้ในการแก้ไขค่า permission ให้กับ users ต้องทำการ copy ไฟล์ 99-pololu.rules ไปยังตำแหน่ง     /etc/udev/rules.d/
ด้วยคำสั่ง

$ sudo cp 99-pololu.rules /etc/udev/rules.d
 

ถ้าหากได้ทำการต่อบอร์ด Pololu Servo Controller ไว้แล้วต้องทำการถอดออกก่อน ทำการเรียกโปรแกรมด้วย

$ ./MaestroControlCenter

ให้สังเกตุ มีเครื่องหมาย จุด หน้า เครื่องหมาย /  ก็จะเปิดโปรแกรม Pololu Maestro Control Center ได้