Code Monkey home page Code Monkey logo

sj-ssc-arduino-library's Introduction

Scubajet SSC Arduino Library

Arduino library for interfacing with a SCUBAJET Portable over UART.

Usage

Initialize VescUart class and select Serial port for UART communication.

#include <ScubaUart.h>

VescUart UART;

void setup() {
  Serial.begin(9600);

  UART.setSerialPort(&Serial);
}

Avalibe functions:

void setSCUBA_POWER_ON();          //Must be called in the fist 200ms after Power on

void sendSCUBA_POWER_KEEPALIVE();  //Activates SSC Powwer for 135sec 

void setSCUBA_LED_ON();  //Turn on NOSE-LED  

void setSCUBA_LED_OFF(); //Turn off NOSE-LED

void sendKeepalive(); //Musst be send every 1s 

/**
* @brief      Sends a command to the Motor to spin
* @param      Motor-Current in [mA] (Full Power are 45000mA)
*/
void setCurrent([current in mA]); //Spin Motor with specific Current

/**
* @brief      Sends a command to VESC and stores the returned data
* @return     True if successfull otherwise false
*/
bool getVescValues(void);

Telemetry:

//For example: 
float batt_voltage = UART.data.v_in;

//Parameters:
float v_in;
float temp_fet;
float temp_motor;
float temp_mos3;
float temp_mos4;
float temp_mos5;
float temp_mos6;
float temp_pcb;
float current_motor;
float current_in;
float rpm;
float duty_now;
float amp_hours;
float amp_hours_charged;
float watt_hours;
float watt_hours_charged;
int32_t tachometer;
int tachometer_abs;
float avgMotorCurrent;
float avgInputCurrent;
float dutyCycleNow;
float ampHours;
float ampHoursCharged;
float wattHours;
float wattHoursCharged;
float pidPos;
uint8_t id;
int error; 
int fault_code;

sj-ssc-arduino-library's People

Contributors

damirbijedic avatar lukas-kaiser-sj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.