2012-11-14から1日間の記事一覧

Arduinoのループバックテスト

簡単すぎてExampleにもなかったのでのっけとく。 http://www.geocities.jp/kuman2600/gbook57.html void setup() { Serial.begin(9600); } void loop() { if(Serial.available() > 0){ char inChar = Serial.read(); Serial.write(inChar); } }

Objective-Cの中にC++を入れる

今作ってるコードヘッダファイル // // NWOViewController.h // ModelaJogger // // Created by shohei on 11/11/12. // Copyright (c) 2012 shohei. All rights reserved. // #import <UIKit/UIKit.h> @interface NWOViewController : UIViewController { //IBOUtletの宣言</uikit/uikit.h>…

GCCでObjective-Cをコンパイルしてみる

http://www.atmarkit.co.jp/fcoding/articles/objc/02/objc02c.html Objective-Cがターミナルからコンパイルできることを知った。HelloWorld.m #include <Foundation/NSObject.h> #include <stdio.h> //クラス定義 @interface HelloWorld : NSObject - (void) hello; @end //クラスの実装 @im</stdio.h></foundation/nsobject.h>…

ArduinoでV-USBを使う

http://arduino.cc/forum/index.php/topic,123306.msg931694.html#msg931694 からhttp://www.railways-in-miniature.co.uk/electronics/arduino/V-USB%20on%20Arduino.zipをダウンロード。 usbdrv.hをArduinoのライブラリフォルダに入れる。サンプル Mouse.…