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);

Sunday, July 23, 2017

ติดตั้ง Arduino core สำหรับ ESP32S




ติดตั้ง Arduino core สำหรับ ESP32S


บอร์ด NodeMCU V1.1 ESP32S มีความสามารถน่าสนใจ โดยมี WIFI และ Bluetooth ในตัวทั้ง ความเร็ว และ เมโมรี ก็มากกว่า NodeMCU V2 ESP8266 ลองดูตารางเปรียบเทียบ ภาพจาก เวป

https://www.youtube.com/watch?v=Mq1YhgS5VkY



ติดตั้งArduino core สำหรับ ESP32S ในการ

ติดตั้งบน OS Linux สามารถเข้าไปดูรายละเอียดที่ https://github.com/espressif/arduino-esp32#instructions-for-debianubuntu-linux
โดยใช้คำสั่ง ดังนี้
  หลังจากการติดตั้งให้ restart Arduino IDE จากนั้นไปที่ Tools จะมีชือ บอร์ด ESP32DevModule




รายละเอียดขา Pin Map


ภาพจาก https://github.com/espressif/arduino-esp32#instructions-for-debianubuntu-linux


Saturday, July 22, 2017

แก้ปัญหา NodeMCU ทำการ Upload ข้อมูลไม่ได้


แก้ปัญหา NodeMCU upload ข้อมูลด้วย Arduino IDEไม่ได้





เมื่อทดลองใช้ NodeMCU V2 ด้วย Arduino IDE โดยใช้ OS Linux มีปัญหา อัพโหลด ข้อมูลลงไปยัง บอร์ดไม่ได้ มีข้อความ

An error occurred while uploading the sketch

error: cannot access /dev/ttyUSB0


 

ให้ทำการแก้ไข permissionโดย ใช้คำสั่ง
 
$ sudo usermod -a -G dialout <username>
$ sudo chmod a+rw /dev/ttyUSB0


โดย <username> คือชื่อที่ใช้ในการ ล๊อกอิน ของคอมพิวเตอร์
ข้อมูลจาก

Saturday, July 8, 2017

เล่นกับ Micro:Bit แก้ปัญหา Pair Bluetooth


แก้ปัญหา Pair micor:bit ไม่ได้





ผู้เขียนได้ micor:bit จากร้าน inex



 

เมื่อทดลองเล่น โดยการทดสอบ Pair bluetooth กับ โทรศัพท์ ได้อย่างราบรื่น ลองดูวิธี
https://www.youtube.com/watch?v=L54Sp2DZibA

การเขียน ข้อมูลลงใน micro:bit ทำได้หลายวิธี เช่น JavaScript Block หรือใช้ Micro Python
http://python.microbit.org/editor.html

แล้วทำการทดสอบโปรแกรม บน micor:bit ได้อย่างไม่มีปัญหา ต่อมาได้ทำการ Pair bluetooth อีกครั้งกับ Tablet ปรากฎว่าไม่สามารถทำให้ micor:bit เข้าสู่ mode pair bluetooth ได้พบวิธีแก้ไข โดยสาเหตุมาจากสคริป hex ไฟล์ ที่สร้างด้วย micro python อยู่ทำให้ไม่รองรับการ pair

ข้อมูลจาก






….HEX files compiled form python scripts are not compatible with Bluetooth

วิธีแก้ไข ให้ใช้ ไฟล์ HEX จากการเขียนด้วย Blocks Editor หรือ ดาว์โหลด จาก เวปhttp://microbit.org/en/2017-03-07-javascript-block-resources/

แล้ว ใส่ลงไปใน Micro:Bit จากนั้น เริ่มทำการ pair bluetooth ใหม่ได้