@startuml
'start
:instantiate mussel object;
:instantiate bluetooth object;
group init
:setup mussel sensors;
:setup bluetooth beacon;
end group
split
while (each 500ms)
group loop {
:read sensors;
:normalize sensor data
as a gape angle;
:add gape angle to beacon;
end group
endwhile
-[hidden]->
kill
split again
while (each 100ms)
:broadcast beacon;
endwhile
-[hidden]->
kill
@enduml