SM130.cpp File Reference

SM130 library for Arduino. More...

#include <Wire.h>
#include <string.h>
#include "SM130.h"

Go to the source code of this file.

Functions

void arrayToHex (char *s, byte array[], byte len)
 Convert byte array to null-terminated hexadecimal string.
char toHex (byte b)
 Convert low-nibble of byte to ASCII hex.
void printArrayAscii (byte array[], byte len)
 Print byte array as ASCII string.
void printArrayHex (byte array[], byte len)
 Print byte array as hexadecimal character pairs.
void printHex (byte val)
 Print byte as two hexadecimal characters.


Detailed Description

SM130 library for Arduino.

Author:
Marc Boon <http://www.marcboon.com>
Date:
May 2009

Controls a SonMicro SM130/mini RFID reader or RFIDuino by I2C

Arduino analog input 4 is I2C SDA (SM130/mini pin 10/6)
Arduino analog input 5 is I2C SCL (SM130/mini pin 9/5)
Arduino digital input 4 is DREADY (SM130/mini pin 21/18)
Arduino digital output 3 is RESET (SM130/mini pin 18/14)

See also:
http://www.arduino.cc

http://www.sonmicro.com/1356/sm130.php

http://rfid.marcboon.com

Definition in file SM130.cpp.


Function Documentation

void arrayToHex ( char *  s,
byte  array[],
byte  len 
)

Convert byte array to null-terminated hexadecimal string.

Parameters:
s pointer to destination string
array byte array to convert
len length of byte array to convert

Definition at line 460 of file SM130.cpp.

void printArrayAscii ( byte  array[],
byte  len 
)

Print byte array as ASCII string.

Non-printable characters (<0x20 or >0x7E) are printed as dot.

Parameters:
array byte array
len length of byte array

Definition at line 488 of file SM130.cpp.

void printArrayHex ( byte  array[],
byte  len 
)

Print byte array as hexadecimal character pairs.

Parameters:
array byte array
len length of byte array

Definition at line 509 of file SM130.cpp.

void printHex ( byte  val  ) 

Print byte as two hexadecimal characters.

Parameters:
val byte value

Definition at line 524 of file SM130.cpp.

char toHex ( byte  b  ) 

Convert low-nibble of byte to ASCII hex.

Parameters:
b byte to convert $return uppercase hexadecimal character [0-9A-F]

Definition at line 475 of file SM130.cpp.


Generated on Mon May 11 17:40:05 2009 for SM130 Library by  doxygen 1.5.9