This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ammlab.android.konashitest; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.CompoundButton; | |
| import android.widget.RelativeLayout; | |
| import android.widget.ToggleButton; | |
| import android.widget.CompoundButton.OnCheckedChangeListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ammlab.android.usbmiditest; | |
| import java.nio.ByteBuffer; | |
| import java.util.HashMap; | |
| import java.util.LinkedList; | |
| import android.hardware.usb.UsbConstants; | |
| import android.hardware.usb.UsbDevice; | |
| import android.hardware.usb.UsbDeviceConnection; | |
| import android.hardware.usb.UsbEndpoint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * SBBLE(Konashi) sample program | |
| * Copyright (C) 2013 Yuuichi Akagawa | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UartConfig paramUart = new UartConfig(115200, UartConfig.DATA_BITS8, UartConfig.STOP_BITS1, UartConfig.PARITY_NONE, false, false); | |
| if(mPhysicaloid.open(paramUart)) { | |
| //... | |
| } else { | |
| //... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * HelloADK | |
| * Android ADK(AOA1.0) sample sketch for RLduino78 | |
| * Copyright (C) 2013 Yuuichi Akagawa | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mSerial.begin(FTDriver.BAUD19200); | |
| mSerial.setSerialPropertyParity(FTDriver.FTDI_SET_DATA_PARITY_ODD, FTDriver.CH_A); | |
| mSerial.setSerialPropertyStopBits(FTDriver.FTDI_SET_DATA_STOP_BITS_2, FTDriver.CH_A); | |
| mSerial.setSerialPropertyToChip(FTDriver.CH_A); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <rxduino.h> | |
| #include <iodefine_gcc63n.h> | |
| void sendCommand(unsigned char *data, unsigned short len) | |
| { | |
| Serial.write((const unsigned char*)data, len); | |
| delay(2); | |
| } | |
| void setServoPos(unsigned char ServoID, unsigned short pos) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <rxduino.h> | |
| #include <iodefine_gcc63n.h> | |
| void setup() | |
| { | |
| Serial.begin( 115200, SCI_SCI0P2x ); | |
| //SCI0 偶数パリティ有効 | |
| SCI0.SCR.BIT.TE = 0; | |
| SCI0.SCR.BIT.RE = 0; | |
| SCI0.SMR.BIT.PE = 1; | |
| SCI0.SMR.BIT.PM = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| ******************************************************************************* | |
| * USB-MIDI to Legacy Serial MIDI converter | |
| * Copyright 2012 Yuuichi Akagawa | |
| * | |
| * Idea from LPK25 USB-MIDI to Serial MIDI converter | |
| * by Collin Cunningham - makezine.com, narbotic.com | |
| * | |
| * for use with USB Host Shield 2.0 from Circuitsathome.com | |
| * https://github.com/felis/USB_Host_Shield_2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| W/System.err( 3981): java.io.IOException: Invalid argument | |
| W/System.err( 3981): at org.apache.harmony.luni.platform.OSFileSystem.ioctlAvailable(Native Method) | |
| W/System.err( 3981): at dalvik.system.BlockGuard$WrappedFileSystem.ioctlAvailable(BlockGuard.java:241) | |
| W/System.err( 3981): at java.io.FileInputStream.available(FileInputStream.java:138) | |
| W/System.err( 3981): at org.ammlab.android.helloadk.HelloADKActivity.run(HelloADKActivity.java:261) | |
| W/System.err( 3981): at java.lang.Thread.run(Thread.java:1019) |