| BasicX Examples |
BasicX Code Examples |
|
|
This page contains example code for all BasicX products. The first section contains examples provided by NetMedia which are sorted by product. The second section contains BasicX examples provided by your fellow BasicX users. |
If you would like to contribute please send your BasicX example to Support@BasicX.com |
| BasicX-24/24p & BasicX-35 | Filename | |
|
|
||
| Adding a Timeout to InputCapture | ||
| Deriving Acceleration data from a GPS | ||
| Using block data objects with PlaySound | ||
| Using the Serial 2x16 LCD with BX-24 | ||
| Input Multiplexing with the BX-24 | ||
| Using a 74HCT259 Latch with the BX-24 | ||
| Reading a Garmin GPS with the BX-24 | ||
| Using the Sharp GP2D12 Infrared Ranger | ||
| Sharp GP2Y0A02YK Long Range Version | ||
| Reading buttons and switches | ||
| Using Polaroid ultrasonic rangefinders | ||
| Reading a 4 x 4 matrix keypad | ||
| Measuring resistance with ADC | ||
| Measuring resistance with RCtime | ||
| Controlling hobby servos | ||
| Measuring acceleration with ADXL202 | ||
| Reading IR remote controls | ||
| Reading IR using serial input | ||
| Low power operation using CPUsleep | ||
| Programming Timer1 for edge capture | ||
| Programming Timer1 as a stopwatch | ||
| Dual PWM in background using Timer1 | ||
| The BX-24 6 Day 8 channel data logger | ||
| Controlling the Servo8T with BX-24 | ||
| LCDX | ||
| LCDX Demo Program 1 | ||
| LCDX Demo Program 2 | ||
| BasicX-01 | ||
| Adding a Timeout to InputCapture | ||
| Deriving Acceleration data from a GPS | ||
| Input Multiplexing with the BX-01 | ||
| Reading a Garmin GPS with the BX-01 | ||
| ADXL202 accelerometers | ||
| Using hardware interrupts | ||
| Block data classes | ||
| Interfacing buttons and switches | ||
| Interfacing an IR decoder | ||
| Interfacing hobby servos | ||
| Interfacing a 4x4 matrix keypad | ||
| Measuring resistance with RCtime | ||
| Low power operation using CPUsleep | ||
| Programming Timer1 for edge capture | ||
| Programming Timer1 as a stopwatch | ||
| Dual PWM in background using Timer1 | ||
| Serial 2x16 | ||
| BX-24 example program for Serial 2x16 | ||
| Servo 8T | ||
| A Windows example program | ||
| Source code for Windows example porgram | ||
| Controlling the Servo8T with BX-24 | ||
|
User
contributed examples
|
| File Name | Contributor |
|
NetMedia |
||
Uses the LCDX and keypad to send a user defined pulse out an I/O pin. |
||
NetMedia |
||
Serial example program looks for an upper case "Z" to trigger an event |
||
| |
NetMedia |
|
| Use
VB6 to serially control the outputs of a BX-24 |
||
| |
||
DS1302
Real Time Clock Interface |
||
| |
||
| Data
Transfer PC to/from BX-24 |
||
| |
||
Very
low RAM usage single-to-string conversion function |
||
| |
||
| DebugInput
(& DebugPrint) functions to allow string and byte input through Com1
without using "queue's" (Based on SerialOutString.bas) |
|
|
| |
||
Searches
the one-wire bus for up to ten DS18B20 sensors, reads the temperature
and displays it on the screen |
|
|
| |
||
| GPS
NMEA Sentence Parsing |
|
|
NetMedia |
||
An
easier-to-use version of OpenSPI |
||
| |
NetMedia |
|
| Flushes
serial port |
|
|
| |
NetMedia |
|
Read
Sony Playstation 2 controllers with BX-24 |
||
| |
||
| Variable
resolution InputCapture (with timeout) used to capture all 8 channels
of R/C PPM signal |
||
| |
||
Make
Block Data from ASCII File |
||
| PID
code for BX24 |
||
Two-way
BX 24 to Palm serial comms application |
||
| I2C
Routines from Harry White |
||
NetMedia |
||
Queue
demo in BasicX and VB |
||
| |
||
| RS485
& the BX24 |
||
| Simple code to generate a CRC using the BX24.doc | ||
CRC
simple code for generating a CRC |
||
| |
NetMedia |
|
| Debug.Print
with variable baud |
||
NetMedia |
||
String
comparison function |
||
| NetMedia |
||
| Emulation
of VB's InStr function |
||
Expanding
BX24 inputs and outputs |
||
| NetMedia |
||
| Exchange
data between BasicX and Visual Basic (ALL Source included). |
||
| Microsoft Excel RS232 sample program | ||
| bxTokenizer.zip | NetMedia |
|
| BasicX tokenizer | ||
| com_to_excel.zip | ||
| VB6 program.Com port to excel. cell seperations are done with chr(13). mod-2 | ||
| fm_schematic.gif | ||
| Frequency measurement schematic | ||
Subroutines
to connect a LCD HD44780 to BX-24 using 6 pins |
||
| convert
between integer hex & bin |
||
code
for working with the ft649 + ft639 servo control chips. 25 servos max |
||
| com-excel
source code |
||
| VB Fast String Object - process strings faster in VB | ||
| |
||
| Pot-based
voltage output |
||
Pot-based
voltage output |
||
| |
||
| MAX147
8-ch, 12-bit SPI analog input |
||
32-bit
expandable SPI digital input |
||
| |
||
| 32-bit
expandable SPI digital output |
||
BX24
Kronos Serial LCD BP and ADC example code: well documented |
||
| |
||
| Windows
Scripts to aid in command line compiles |
||
BX-01
Quick Reference (Word) Document |
||
| |
||
| Demonstrates
coprocessor communication for ARobot |
||
Wander
routine for ARobot |
||
| |
||
| BX-24
Eagle3.5 Component |
||
| BitOps.bas | ||
Bit-wise
operations on bytes and arrays |
||
BX-24
controlling DS1267 digital potentiometer subroutines |
||
DS1620
BasicX-24 Code |
||
DS-1820
Interface Module (uses Dallas1Wire.bas) |
||
1-Wire
Interface Module |
||
1-Wire
Example (uses Dallas1820.bas) |
||
Demo
I2C reads Devantech compass. Read direction as 2 bytes |
||
Demo
I2C reads Devantech compass. Read direction as byte |
||
Easy
way of trying out LCD communication - I modified the BX24 demo program
and used Parallax BOE |
||
GP2D02
Ir Ranging |
||
| |
||
| I2C.bas for sending and receiving via an I2C interface. This is just the routines for I2C so you can add them to your project and use them as required. | ||
| LCDMOD.bas | ||
| Scott Edwards (aka SeeTron) LCD Module. Tested with ILM-216 | ||
| LCD_595.bas | ||
| 74x595 to LCD (interface connections and code) | ||
| LCD_Demo595.bas
|
||
| BX-24 to 74x595 to LCD | ||
| LCD_Main.bas
|
||
| High level LCD routines (converted SerialPort.bas) | ||
| Mobot.bas | ||
| BX24 robot code | ||
| MyLCD.bas | ||
| Running an LCD via SPI | ||
| Optrex.bas
|
||
| Some routines for driving a Hitachi HD44780 based Optrex LCD display | ||
| PICnLCD.BAS
|
||
| PICnLCD support for the BX-24 | ||
Unfinished!
A PID 4-button user interface and LCD routines. Posted for multitasking
code analysis |
||
|
Unfinished!
But illustrates "stack flattening" for multitasking. Compare
to PID.BAS which won't multitask on a barebones BX24 |
||
Code
for controlling 2 servos using the hardware PWM |
||
|
Short Description
for above |
||
Some
Extended function for the BX24 |
||
|
formatted
input and output |
||
includes
preliminary floating input |
||
|
Module for
the control and query of an MD05 motor controller. I2C-v2.bas (is required).
|
||
Ping and ARP via CS8900A ethernet
controller |
||
|
toggle output
pin level and POWB (byte POW function) |
||
A
windows console app that creates binary files for BX24 |
||
|
|