GR-SAKURA
GR-KURUMI
GR-COTTON
GR-CITRUS
GR-PEACH
GR-KAEDE
GR-ADZUKI
GR-LYCHEE
GR-ROSE
GR-MANGO(*)
SNShield
Web Compiler
IDE for GR
TOPPERS関連
女子美コラボ
その他
※プロデューサミーティング中
作り方使い方資料
イベント関連
作品記事
体験記事
ライブラリ
ツール
その他・過去ファイル
E1でファーム書き換えとかは、敷居が高いので、初期ファームで、
Arduinoから、何を制御できるのか?を説明した資料を開示希望。
In initial NS-RX231 board, there is just LED movement with touch sensor.
When the board is flahsed, there was not enough information for initial program.
Actually, this workshop is giving many comments, and it is teaching me to know what I should change in software and hardware,
I will change it.
Arduino source
NS-RX231 shield initial firmware.
About the new initial NS-RX231 information, I will upload soon over here.
Now I am making that information document.
I hope this help your test.
For your more information like circuit diagram, you can find at the following link.
http://japan.renesasrulz.com/gr_user_forum_japanese/f/ns-rx231/3927/thread
Thank you.
早速ですが、Arduino_NEW.zipにあるSPI_Master_SPKをArduino Uno R3で動かしてみました。Genio101では動かなかったので・・・ タッチパネルに触れるとスピーカーから音は出ますが、どれ押しても同じ音しか出ないですね。(私だけなのかな?) 他のサンプルはSerialに何か出力されるようにコード書かれているようですが、何も出力されないので、ちゃんと動いているのか?不明です。
シリアルからは、タッチボタンに触れた情報が出力されていました! ns-rx231のファームは、E1を使って、新規プロジェクトは適当なパラメータを選んで、NS-RX231_NEW.zip内にあるTouchApiBase.motを書き込んでみました。
Yes, there was an one mistake
it should be changed from "switch (buf[1]) " to "switch (buf[2]) " in line 37.
The following is SPI-MASTER_SPK.ino source.
- the following -
#include <SPI.h>#include <RX231_Shield.h>
RX231_Shield Shield = RX231_Shield();
uint8_t flg = 1;uint8_t dataFlg = 0;
void setup (void){ Serial.begin(9600); Shield.start(); attachInterrupt(digitalPinToInterrupt(3), receiveInterrupt, RISING);}
void loop (void){ if (flg) { if (dataFlg == 1) { digitalWrite(2, HIGH); digitalWrite(2, LOW); dataFlg = 0; } else { uint8_t buf[14] = {0,}; buf[0] = 0x04; Shield.sendData(0x80, buf); flg--; } } else { if (dataFlg == 1) { dataFlg = 0; uint8_t * buf; buf = Shield.receiveData(); if (buf[1] == 0x40) { Serial.print(buf[2]); Serial.println(" ON"); switch (buf[2]) { case 0x01: Shield.requestSPK(523, 500); break; case 0x02: Shield.requestSPK(587, 500); break; case 0x08: Shield.requestSPK(659, 500); break; case 0x20: Shield.requestSPK(699, 500); break; case 0x40: Shield.requestSPK(784, 500); break; } } } }}
void receiveInterrupt() { if (digitalRead(3) == 1) dataFlg = 1;}