2016年8月15日 星期一

生酮飲食 Ketogenic Diet

"生酮飲食"這個名詞,讓我想到的是酮體ketone body也就是酮症,這在畜牧獸醫學上泛指乳牛泌乳期中,乾物質不足導至低血糖所引起的消化及神經性障礙是種代謝症狀.
那什麼是生酮飲食呢?居然他可以抗(治)癌,這引起我的注意,那是不是這麼"神",真的值得我們以飲食生理的角度來看待他.
六大營養素: 醣,蛋白質,脂肪,礦物質,維生素及水,其中能量營養素為醣,蛋白質及脂肪為三大營養素, 醣與蛋白質的生成熱量約是4大卡/每克,而脂肪為九大卡/每克,簡單來說,以磄類的利用效率最高也最快.
其實對"生酮飲食"的關注,主要還是在老人營養管理及癌症這方向,利用癌細胞的代謝障礙達成治癌或防癌的目的,但個人較感興趣的是血糖的管理所引發的各種發炎及免疫反應,人除了要活得長,也要活的好,任何的營養生理,想必是未來醫學的根源.

2016年7月30日 星期六

Vido N80RK OMNI 4.4 V1.41

It's working.

Ref: http://www.arctablet.com/blog/forum/crewrktablets-rk3188-entwicklung-customroms-development-croms/rom-odys-iron-omnirom-4-4-2-custom-root-firmware-20140530/page-5/

  1. Download CrewRKTablets Odys Iron Omni 4.4 V1.3
  2. Download CrewRKTablets KK Omni V1.3 model fix AOC Q70S15
  3. Replace the kernel.img in rockdev/Image directory with the kernel.img from a stock n80rk tablet. In order to get this stock image you can start with a stock n80rk, root with TPSparkyRoot, install CWM and backup the kernel.img file using CWM. In case you want to skip this step, Oma has posted the kernel here and the model fix here.
  4. Copy the model fix from your PC to an sdcard that you can insert into the n80rk.
  5. Boot the n80rk and turn on USB debugging and make sure the model fix file, and any other for that matter, are on the sdcard and you can see them.
  6. Power off the n80rk.
  7. Go to the directory on your PC where you downloaded the Odys Iron Omni 4.4 rom with the replaced kernel and cd to RKDevelopTool_v1.37. This assumes you have the Rockchip Drivers installed, which can be tricky. I am running Windows 7 64 bit and did not have much problem. It is best to look through the ARCTablet forum to see how to install the drivers.
  8. Start RKAndroidTool.exe, it should start and indicate 7 files to be flashed to the tablet, which are loader, parameter, misc, kernel, boot, recovery and system. backup is not checked. At this point is should show No Found RKAndroid rock usb at the bottom.
  9. While holding down the Vol+ key on the n80rk, plug a usb cable into the tablet. You should hear the usb bing/bong sound (if you have speakers on your PC of course) and the message on the RKAndroidTool should change to Found.
  10. Press EraseIDB and the RkAndroidTool should indicate 4096 blocks cleared and there will appear a Done message to the window at the right of the table. It takes about 10 secs.
  11. Press Run and the flashing will commence. It will take about one minute and again you will see a Done message.
  12. At this point, the n80rk should reboot by itself and will boot into ClockWork Recovery.
  13. Move the highlighted bar to wipe cache partition using the Vol+/Vol- keys on the n80rk and press the power key as Enter. From memory, when you hit enter you will need to use Vol+/Vol- to select Yes to cofirm.
  14. Move the highlighted bar to wipe data/factory reset using the Vol+/Vol- keys on the n80rk and press the power key as Enter. From memory, when you hit enter you will need to use Vol+/Vol- to select Yes to confirm.
  15. Next you want to apply the patch (model fix AOC Q70S15). This can be done by selecting install zip from sdcard and then on the next menu choose zip from external sdcard and then you will see the file you loaded on your sdcard (model fix AOC Q70S15). You need to select that and then select Yes on the net screen to confirm.
  16. Once that is complete, you return to the home menu of CWM by selecting +++++ Go Back +++++ and finally selecting reboot system now. CWM popup up two screens when you select reboot system now and I just answered No to both of them, though perhaps Yes is a better answer? Maybe someone can provide guidance??
  17. I then had to change the rotation by using build.prop (get from AppStore) to modify ro.sf.hwrotation to equal 270 as the screen rotation was incorrect.
  18. That's it, now you have Android 4.4 running on an Vido n80rk.


2016年7月27日 星期三

PSU

DIY PSU for desktop use

2016年4月21日 星期四

萬能學習型遙控器57# IC:SJ-018+24C16

純備份用-"這只不錯用 !"

一、將學習型遙控器與被複製遙控器發射頭相對齊放好

二、用筆或牙籤戳住學習遙控器[SET]孔、直到LED燈號持續亮起後放開

三、按一下想要學習的按鍵[電源],則LED燈將更亮

四、按住被複製遙控器的[電源],直到學習型LED燈閃爍三下後放開,
   則學習拷貝完成。

五、戳一下[SET]孔,燈滅即設定完成

2016年1月18日 星期一

Debian8安裝無線網卡

ubuntu太胖,acer aspire T-300跑太動,索性利用假日重裝debian8 lxde
可是bcm4306一直跑不起來,jessie內建的wicd對無線網卡不太友好,
即使移除wicd,使用network-manager-gnome還是無法從gui去設定ssid及pw
記錄一下text mode的連線過程

dmesg | grep Network
lspci --nn
確認網卡
apt-get install firmware-b43-installer
apt-get remove wicd
apt-get install network-manager-gnmoe
還是無解,雖然wlan0有on起來
iwlist wlan0 scan
手改wlan0的dhcp及ssid/pw
vi /etc/network/interfaces
  auto wlan0 
  iface wlan0 inet dhcp
    wpa-ssid "APNAME"
    wpa-psk "PW"





/etc/init.d/networking restart
這樣才搞定! 累~~~

另外jessie中文字型的安裝也不同 ttf改成fonts
 ex. ttf-arphic-uming --> fonts-arphic-uming







2015年10月13日 星期二

PAM8403



這個CHIP真的很厲害,小小一片,加組4歐姆3瓦的喇叭及USB電源即可達成一組電腦音箱,便宜又好用.難怪無線音源用它來推就對了!

2015年9月29日 星期二

DS1302_DS18x20_DHT11_2004LCD



溫度,濕度再加上時間,本想再加上SD卡,使它有Datalogger的功能,無耐與I2CLCD的libraries相衝吧?

#include "stdio.h"
#include "DS1302.h"
#include "OneWire.h"
#include "DallasTemperature.h"
#include "Wire.h"
#include "LiquidCrystal_I2C.h"
#include "dht.h"

#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

LiquidCrystal_I2C lcd(0x3f,20,4);
dht DHT;
#define DHT11_PIN 3

namespace {

const int kCePin   = 5;  // Chip Enable
const int kIoPin   = 6;  // Input/Output
const int kSclkPin = 7;  // Serial Clock

DS1302 rtc(kCePin, kIoPin, kSclkPin);

String dayAsString(const Time::Day day) {
  switch (day) {
    case Time::kSunday: return "Sunday";
    case Time::kMonday: return "Monday";
    case Time::kTuesday: return "Tuesday";
    case Time::kWednesday: return "Wednesday";
    case Time::kThursday: return "Thursday";
    case Time::kFriday: return "Friday";
    case Time::kSaturday: return "Saturday";
  }
  return "(unknown day)";
}
void printTime() {
  // Get the current time and date from the chip.
  Time t = rtc.time();

  // Name the day of the week.
  const String day = dayAsString(t.day);

  // Format the time and date and insert into the temporary buffer.
  char buf[50];
  snprintf(buf, sizeof(buf), "%s %04d-%02d-%02d %02d:%02d:%02d",
           day.c_str(),
           t.yr, t.mon, t.date,
           t.hr, t.min, t.sec);

  // Print the formatted string to serial so we can see the time.
  Serial.println(buf);
 }
}  // namespace

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  //Serial.println("Dallas Temperature IC Control Library");

  // Start up the library
  sensors.begin();

  lcd.init();
  lcd.backlight();
  //lcd.print("Room Temperature");
}

void loop(void)
{
  printTime();
  lcd.setCursor(0,0);
  Time t = rtc.time();
  char buf[50];
  snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d",
           t.yr, t.mon, t.date,
           t.hr, t.min, t.sec);
  //Serial.println(buf);
  lcd.print(buf);
  //Serial.print("Requesting temperatures...");
  //sensors.requestTemperatures();
  //Serial.println("DONE");
  Serial.print("Temperature for the device 1 (index 0) is: ");
  Serial.println(sensors.getTempCByIndex(0));
  Serial.print("Temperature for the device 2 (index 1) is: ");
  Serial.println(sensors.getTempCByIndex(1));
  lcd.setCursor(0,1);
  lcd.print("DS18S20 A: ");
  lcd.print(sensors.getTempCByIndex(0));
  lcd.print("C");
  lcd.setCursor(0,2);
  lcd.print("DS18B20 B: ");
  lcd.print(sensors.getTempCByIndex(1));
  lcd.print("C");
  int chk = DHT.read11(DHT11_PIN);
  switch (chk)
  delay(1000);
  Serial.println(DHT.humidity, 1);
  Serial.println(DHT.temperature, 1);
  lcd.setCursor(0,3);
  lcd.print("DHT11:  ");
  lcd.print(DHT.humidity, 0);
  lcd.print("%  ");
  // lcd.print("Temp: ");
  lcd.print(DHT.temperature,0);
  lcd.print("C");
  delay(1000);
}