Skip to content
forked from gh2o/BotHS

A basic web server/framework for the J2ME or CLDC/1.1 platforms, tailored for FRC robotics teams.

Notifications You must be signed in to change notification settings

badubizzle/BotHS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BotHS

BotHS is an embedded web server tailored towards FRC robotics teams.

Features

  • Basic HTML templating system.
  • MTV (model-template-view) paradigm.
  • WebSocket support: stream data straight to the browser!

To Get Started

After downloading the sources via git or the ZIP file above,

  • Copy everything in the src folder into the src folder in your project
  • Copy everything in the resources folder into the resources folder in your project

Add this somewhere in your code (preferably the constructor of your main class):

Server server = new Server ();
server.addRoute ("/", new TemplateView ("/index.html"));
server.start ();

Add these lines to the import statements of that file:

import org.team4159.boths.Server;
import org.team4159.boths.views.TemplateView;

In your resources folder, create a file named index.html:

<!DOCTYPE html>
<html>
	<head>
		<title>Hello from BotHS!</title>
	</head>
	<body>
		<h1>BotHS!!!</h1>
	</body>
</html>

Build, deploy, and go to the address of your cRIO on port 8080 (http://10.56.78.2:8080/ if you are team 5678) and if all went well, you should see your page! It was really that simple.

This was made with the intention of allowing the cRIO device to access the rich potential of the web browser. With BotHS, you can access and control your robot with any web-capable device during testing. The possibilities are endless!

Thanks to Christian Plattner for providing a CLDC-compatible SHA1 library for WebSocket support.

About

A basic web server/framework for the J2ME or CLDC/1.1 platforms, tailored for FRC robotics teams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published