B9X Electronics presents
Build real projects with B9X Basic.
A clear, approachable programming language for connected devices, automation, sensors, audio, voice, displays, lighting, and intelligent applications.
One language. Many possibilities.
Programming that stays close to your idea
B9X Basic combines familiar BASIC-style readability with the functions needed to create useful electronic and connected projects. Write straightforward code without burying your application in unnecessary complexity.
Easy-to-read programs
Use clear assignments, IF statements, WHILE loops, FOR loops, subroutines, and functions.
Numbers and strings
Work with double-precision values, text, numeric arrays, formatting, searching, and conversion.
Your own functions
Organize applications with numeric and string-returning functions that accept numeric or string parameters.
Physical input and output
Read switches and sensors, control outputs, measure analog signals, and read temperature.
Visual and audible feedback
Drive OLED displays, WS2812 lighting, WAV playback, and local text-to-speech.
Connected intelligence
Publish MQTT data, transcribe speech, ask text questions, and create natural spoken responses.
Readable by design
Code you can understand at a glance
The structure is simple enough for a first project and capable enough for sophisticated applications.
- Semicolon-terminated statements
- Structured IF, WHILE, and FOR control flow
- Numeric and string-returning functions
- Nonblocking polling patterns for connected services
' Ask a question and speak the answer
oaixInit(b9x_key1$);
ttsxInit(5, 4, 6, b9x_key1$,
"marin", "Speak naturally.");
oaixAskQuestion(1,
"What is the capital of Michigan?");
let answer$ = "";
while len(answer$) == 0 do
let answer$ = oaixGetAnswer$();
wait(50);
wend
print answer$;
ttsxSpeak(answer$);
Built for useful applications
Connect code to the world around it
B9X Basic includes functions for the devices and services commonly used in modern electronic projects.
A practical workflow
From idea to working program
Write
Describe the behavior with readable statements, functions, and control flow.
Connect
Use built-in functions to read sensors, control hardware, and communicate online.
Improve
Print values, test conditions, and refine your program one clear section at a time.
Questions
B9X Basic at a glance
Do I need previous BASIC experience?
No. Familiar BASIC experience helps, but the language reference explains program structure, variables, operators, statements, and every available function.
Can B9X Basic organize larger programs?
Yes. Use subroutines, numeric functions, string-returning functions, parameters, loops, and global values to keep programs organized.
Can it work with voice and online services?
Yes. Available functions support text questions, speech transcription, natural text-to-speech, and MQTT messaging.
Can I keep API keys out of the program text?
Yes. Five protected key variables can hold passwords, API keys, and similar settings for use by a program.
Start building with B9X Basic
Explore B9X Electronics products, review the complete language reference, and begin turning your next idea into a working application.
Browse B9X Products Contact B9X Electronics
