Renesas Community
Renesas Community
  • User
    Join or sign in
  • Site
  • Search Community
  • User
  • Renesas Engineering Community
  • FAQ
  • HELP
  • More
  • Cancel
がじぇっとるねさすコミュニティ
がじぇっとるねさすコミュニティ
NS-RX231 NS-RX231とArduino UNOとの接続例
  • Forums
  • Files
  • がじぇっとるねさす ゆーざー会 - Wiki
  • Tags
  • More
  • Cancel
  • New

 

 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関連

 女子美コラボ

 その他

 ※プロデューサミーティング中

 作り方使い方資料

 イベント関連

 作品記事

 体験記事

 その他

 

 ライブラリ

 ツール

 その他・過去ファイル

  • State Not Answered
  • Replies 4 replies
  • Subscribers 427 subscribers
  • Views 3331 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related Tags
  • NS-RX231
  • シールドモード
  • 回路図
  • 変更検討項目一覧
  • 接続
  • 添付のピン
Related

NS-RX231とArduino UNOとの接続例

Akihiro Matsuyama
Akihiro Matsuyama over 6 years ago

NEWTC 柳さんの依頼で、以下の3ファイルをUpLoadします。

① Arduino Shield.pdf:NS-RX231とArduino UNOとの接続説明資料

② Arduino_Shield_src_NS-RX231_V1.1.zip:NS-RX231側ソース

③ Arduino_UNO_src_control_NS-RX231.zip:Arduino UNO側ソース

 

 

0143.Arduino Shield.pdf1614.Arduino_Shield_src_NS-RX231_V1.1.zip2275.Arduino_UNO_src_control_NS-RX231.zip

  • Reply
  • Cancel
  • Cancel
  • @chobichan
    0 @chobichan over 6 years ago
    Slave Selectは、いくつか候補の中から選べた方がいいんじゃない?
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • シアル (カミタニ)
    0 シアル (カミタニ) over 6 years ago in reply to @chobichan
    Yes, you are correct. I think at next version that jumper will be deleted, and the address selector pin will be just GND.
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • fujita nozomu
    0 fujita nozomu over 6 years ago
    #ifndef Shield_h
    #define Shield_h
    
    #include "Arduino.h"
    #include "SPI.h"
    
    class RX231_Shield {
      public:
        void start();
        void sendData(uint8_t cmd, uint8_t * data_buf);
        uint8_t * receiveData();
        void setLed(uint8_t TS15, uint8_t TS16, uint8_t TS22, uint8_t TS23, uint8_t TS27, uint8_t TS30);
        void requestBLT(uint8_t data);
        void requestSPK(uint16_t hz, uint16_t ms);
        void requestMPU();
        void requestIR(uint8_t customData, uint8_t data) ;
        
        byte receiving(byte txData);
    };
    
    
    #endif
    

     

    • 二重インクルード防止のマクロ名が Shield_h というのはどうかという気がします
    • 開始のメソッドが start() となっていますが、Arduino のスタイルでは begin() を使うのが普通だと思います。end() もあると良いでしょう
    • sendData() の第2引数ですが、読み取り専用なので const uint8_t* とすべきです
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • シアル (カミタニ)
    0 シアル (カミタニ) over 6 years ago in reply to @chobichan
    ご提案、有難うございます。
    現在、対応できるよう変更を進めています。テストしているところですので、確認ができましたら、またお知らせします。
    有難うございます。
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
サイト使用条件
プライバシーポリシー
お問い合わせ
© 2010-2023 Renesas Electronics Corporation. All rights reserved.