[電子工作]VFD 速度改善 *
http://www.noritake-itron.jp/japanese/products/module/gu3k/tokuchou/tokuchou3/tokuchou3.htm
このページによると、パラレルにしてもそんなに速くはならないっぽい 
とは言え、DMAモードを使うわけにはいかないからなぁ。
時計をアニメーションするだけならリアルタイムイメージ表示を使わなくても登録イメージ表示でも良いのでは?と思い、あらかじめフラッシュに登録したイメージを表示する方法に変更。
メモリを32kB使っちゃったけど、20フレーム/秒以上になったので滑らかに動くようになった 
[電子工作]VFD 天気表示 *
ライブドアが天気のXML配信をしていたので、早速取得コード書く。
| private bool GetWeather(int city, out string Weather, out string TempMax, out string TempMin)
{
bool result = false;
Weather = null;
TempMax = null;
TempMin = null;
try
{
XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.Load(string.Format(@"http://weather.livedoor.com/forecast/webservice/rest/v1?city={0}&day=today", city));
XmlNode nodeWeather = xmlDoc.SelectSingleNode("/lwws/telop");
XmlNode nodeTempMax = xmlDoc.SelectSingleNode("/lwws/temperature/max/celsius");
XmlNode nodeTempMin = xmlDoc.SelectSingleNode("/lwws/temperature/min/celsius");
if (nodeWeather != null)
Weather = nodeWeather.InnerText;
if (nodeTempMax != null)
if (nodeTempMax.InnerText.Length > 0) TempMax = nodeTempMax.InnerText;
if (nodeTempMin != null)
if (nodeTempMin.InnerText.Length > 0) TempMin = nodeTempMin.InnerText;
result = true;
}
catch
{
;
}
return result;
}
|
自分用なので、エラー処理はあんまり考えなくていいかな。