GR-SAKURAが発売されたのは2011年末頃で、その当時はWebコンパイラかRenesasのe2 studioあたりを使うしかなかった。 Arduino類似のライブラリが公開されていなかったため、ローカルでビルド環境を整えるのは面倒であったが、 Arduinoから派生したIDE4GRという簡単な開発環境が作られ、ローカルでArduinoと同じ使用感で開発出来るようになった。 このIDE4GRの最新バージョンには、GR-PEACH(RZ/A1H (R7S721001VCBG, 外部FLASH 8MB/内蔵RAM 10MB)及びGR-LYCHEE(RZ/A1LU (R7S721030VCFP), 外部FLASH 8MB/内蔵RAM3MB) 向けのOpenCVライブラリが統合されており、これらのマイコン単体ではOpenCVによる画像処理ができる。
SW3がRUN側の時、初めの電源ONで、書き込まれたファームウエアが開始し、一回リセットするとUSB Mass storageでファームウエア書き込み可能なモードになる。 ここで書き込むと、書き込んだファームウエアが自動的に開始される。SW3がRUNと反対側の時はGeneric Boot Deviceで、RenesasのFDTでファームウエア・ブート路だ書き込みができる。
ボード上の4つあるLEDは使用できる。サンプルの初期コードはGR-KURUMI用にled = 23になっているが、GR-SAKURAではPIN_LED0、PIN_LED1、PIN_LED2、PIN_LED3で 定義されている。
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 23 has an green LED connected on most KURUMI boards.
// give it a name:
int led = PIN_LED0;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Ethernetについては、執筆時点のIDE4GR 1.03では、 GR-KURUMIはWIZ550ioモジュールを使用した上での対応、GR-SAKURA(RX63N)のみ内蔵ペリフェラル対応となっており、GR-KAEDE(RX64M)、GR-PEACH(RZ/A1H)については未対応のようであり、 IDE4GRで開発する時は、ネットワーク・画像処理等の用途によって使い分けるのが良いだろう。あるいは以前通りWebコンパイラかe2 studioを使うことになる。 GR-SAKURAのEthernetライブラリには、Renesasのスタックが組み込まれているので、ArduinoのEthernetシールドを使う要領で使用できるが、もちろんシールドは必要ない。 シリアルは、CDCのVCOMドライバを入れる必要があり、配布されているinfを使ってインストールすると良い。 このファイルは特殊電子回路謹製であるが、そのサイトによると、RX621のEthernetは100Mbpsだが、 スループットはそれほど良くなく、せいぜい40Mbpsとのことである。 COMポートを表示しながらサンプルのWebServerを走らせると、シリアルが遅いため応答に詰まりが見られる。
Phoebe: Hey is this true, that you write a lot of your own lines?
Joey: Uh, well, kinda yeah. Like, remember last week when Alex was in the
accident? Well the line in the script was, 'If we don't get this woman to a
hospital, she's going to die.' But I made it, ' If this woman doesn't get to a
hospital, she's not gonna live.'
-- David Crane & Marta Kauffman
-- "Friends" (T.V. Show) ( http://en.wikipedia.org/wiki/Friends )
<rindolf> mortal5: you need to print the header.
<rindolf> mortal5: print header()
<mortal5> rindolf, ...I absolutely love it when my textbook leads me
wrong..
<rindolf> mortal5: what is your textbook?
<mortal5> "web wizards guide to perl and cgi"
<mortal5> lol
<mortal5> only the finest for the students at my university
<buu> Hahaha
<buu> That's awesome.
<cfedde> Is this what we're teacing these days? Oh my.
<somian> Blows the mind, doesn't it cfedde!
<cfedde> somian: it does.
<cfedde> I suppose that I'm commenting out of context. but why the mix
and match.
<f3ew> What mind?
<cfedde> yours, with this .48
* somian sends in CSI las vegas to clean up
<rindolf> mortal5: what is your university?
<mortal5> rindolf, I'm too ashamed to tell :p
<rindolf> mortal5: heh.
<rindolf> mortal5: is it bad?
<mortal5> rindolf, no not really, we have a fairly well known cs dept
<somian> Just so long as it isn't SUNY@BUFFALO
<mortal5> it's just the teacher i'm using, she's a total flake
-- Misleading Textbooks about Perl
-- #perl, Freenode