This file contains 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 "Arduino_LED_Matrix.h" | |
ArduinoLEDMatrix matrix; | |
uint8_t frame[8][12] = { | |
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
This file contains 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 "Arduino_LED_Matrix.h" | |
ArduinoLEDMatrix matrix; | |
void setup() { | |
matrix.begin(); | |
} | |
uint8_t frame[8][12] = { | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
This file contains 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
//Main necessary methoeds | |
// get the bluetooth device reference | |
public BluetoothAdapter findMyBT(BluetoothAdapter myBt){ | |
myBt = BluetoothAdapter.getDefaultAdapter(); | |
if (myBt!= null) { | |
Log.i("BTDEV","BT Device Found!"); | |
Log.i("BTDEV","" + myBt.getName()); | |
return myBt; | |
} else { | |
Log.i("BTDEV","No BT Device Found!"); |
This file contains 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
//sample of a bluetooth RfComm COmmunication between a GPS and OSX. | |
//more information on: http://pestohacks.blogspot.it/2012/07/make-osx-talks-with-bluetooth-gps.html | |
//let's go on. | |
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
{ | |
NSLog(@"ok, go on"); // | |
btDevice = nil; | |
IOBluetoothDeviceInquiry *ibdi = [IOBluetoothDeviceInquiry inquiryWithDelegate:self]; //inquiry, have delegates methoeds | |
[ibdi setUpdateNewDeviceNames:YES]; //Yes, I want also names for the bt devices found. |