HSC2011/Communication

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen

< HSC2011

Most pieces of information (events, commands, etc.) travel through the whole software stack. The steps there and interfaces are:

File Implementation Interface Description
firmware/ hardware.{cc,h} Arduino calls most low-level hardware functions, defining which pin maps to which function
boolean button(), void buzzer(uint16_t freq), …
firmware/ firmware.cc main loop dispatch events
firmware/ firmware_net.{cc,h} (running on the buzzer) net_proc(), net_send_until_acked() send what is in send buffer, receive into send buffer
RF12 library calls
firmware/ pktspec.h struct formats for different package types "wire" format of data
firmware/ firmware_net.{cc,h} (running on the base station) RF library calls
net_proc(), net_send()
firmware/ firmware.cc main loop dispatch events
firmware/ firmware_net.{cc,h} ser_printpkt(), ser_poll() parse and serialize packages
Arduino serial library calls
Serial USB connection S 01 * * nnnn... as described in serialprotocol
Ygor Java server Sends packages inserted via HTTP interface to serial, stores packages received via serial for polling
/poll?name=ls_events.sql
software/ …/ base.js JavaScript application library for developing games
Edubuzzer.event_occurred, Edubuzzer.send_set() game development API
your application whatever you like

Serial format

The serial serialization format is important as it is passed through the whole software stack (from C to JavaScript, although both also use processed forms of it). Even if it not directly used in the "wire" format strucs and the JavaScript object representation, it can be used to understand the other representations.

The serial format documentation also explains lots of details of how the devices can be controlled, so it is recommended reading for game developers env everyone else.

Read it in full length at HSC2011/Communication/Serial protocol.

If you want to test the devices manually on the serial console, use a baudt rate of 57600.