Skip to content

React components to transmit and receive messages through ultrasonic sound.

adhbh/react-sonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-Sonic

React components to transmit and receive messages through ultrasonic sound.

A ReactJs implementation of an awesome library sonicnet.js by Boris Smus. Here is the video and his blog post on ultrasonic networking.

Run Example

$ npm install
$ npm start

Components

SonicSocket

Encodes text as audio streams.

  1. Receives a string of text.
  2. Creates an oscillator.
  3. Converts characters into frequencies.
  4. Transmits frequencies, waiting in between appropriately.
props
  • charDuration
  • rampDuration

SonicServer

Extracts meaning from audio streams

  1. Listen to the microphone.
  2. Do an FFT on the input.
  3. Extract frequency peaks in the ultrasonic range.
  4. Keep track of frequency peak history in a ring buffer.
  5. Call back when a peak comes up often enough.
props
  • peakThreshold
  • minRunLength
  • timeout

About

React components to transmit and receive messages through ultrasonic sound.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published