TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 24

MODULE, BLUETOOTH, DATA ACQUISITION

TOOTHPIC

Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet

Specifications of TOOTHPIC

Svhc
No SVHC (15-Dec-2010)
Page 24
4. Open the file ToothPIC303.c in the development kit main directory and save it in your project
5. Open the file Main.c development kit main directory and save it in your project directory with the
6. During initialization, the FlexiPanel User Interface server must be started. Unlike regular BlueMatik
7. Events that happen to the FlexiPanel server are reported in the FxPEvent callback.
8. Finally, code must be added to process the event when the ChangeText button is pressed. Add the
memory. The header file contains computer-generated macros to make it easier to access the
controls from your application code.
directory. This file allows you to customize the ToothPIC Services for this specific application. In this
case the only modification required is to change the device name. At the beginning of the file,
#include the file HelloWorldRes.h created by FlexiPanel Designer. The code will then begin as
follows:
name HelloWorldFxP.c. This file is an ‘empty shell’ main application containing all the functions
you need to provide code for in your application. At the beginning of the file, #include the file
HelloWorldRes.h created by FlexiPanel Designer. Also create static text variables for the words
“Hello and World, so that the code begins as follows:
slave mode, this does not need to be re-started each time a device disconnects so the code is simpler.
Place the following lines immediately prior to the start of the infinite look in the main function:
following lines to the callback function so that the red LED comes on when a verified client connects:
following lines to the callback function:
9-Apr-06
#define __ToothPIC_c__
#include "ToothPIC.h"
#include <p18f6720.h>
// If programming a FlexiPanel UI from FlexiPanel Designer using data files,
// include the header file Designer creates, (comment out otherwise)
#include "HelloWorldRes.h"
#include "ToothPIC.h"
#include <p18f6720.h>
#include "HelloWorldRes.h"
rom unsigned char * szHello = "Hello\r\n";
rom unsigned char * szWorld = "World\r\n";
FxPCommand( FxPC_Start, 0, 0 );
AwaitBMTOK;
if ( EventID==FxPE_Connect )
{
}
if ( EventID==FxPE_Disco )
{
}
// Check for control events
if ( EventID==FxPE_ClntUpdate )
{
// turn off red led during connection
LedRed = LedRedOn;
// turn off red led after disconnection
LedRed = LedRedOff;
// If the button was pressed...
if (*((unsigned short*) pData) == ID_Change_Text_2)
{
Toothpick 3.0.00007
// Is the current text value Hello or World?
if (pText1_1[0] == 'H')
{
// set the text value to World and update the client
DS380-8
© FlexiPanel Ltd
// Start FlexiPanel service
// Service operating, no client
Patents apply and/or pending
www.FlexiPanel.com
Add the

Related parts for TOOTHPIC