Skip to content

Instantly share code, notes, and snippets.

@crazycoder1999
crazycoder1999 / ArduinoCollisionAnimation.ino
Last active July 8, 2023 19:35
ArduinoCollisionAnimation
#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 },
@crazycoder1999
crazycoder1999 / ArduinoMatrixSample.ino
Last active July 5, 2023 11:10
Playing with Arduino Uno R4 Matrix: simple animation
#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 },
@crazycoder1999
crazycoder1999 / androidbtserver.java
Created August 1, 2012 22:37
Bluetooth Server On Android
//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!");
@crazycoder1999
crazycoder1999 / BtOsx.m
Created July 18, 2012 23:26
BT Communication On OSX
//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.