GithubHelp home page GithubHelp logo

richcomm-ups-mchck's Introduction

Simple USB UPS interface using MC HCK

DESCRIPTION

I needed to build USB device that is recognizable as UPS by Network UPS Tools (NUT).

It seems that one of the simplest USB drivers in NUT is drivers/richcomm_usb.c.

This code implements richcomm_usb.c protocol using MC HCK prototype board based on Freescale Kinetis K20 MCU (ARM Cortex-M4). I just had spare kit and wanted to try the SDK, so the code has a lot of comments.

REQUIREMENTS

BUILD AND INSTALL

  • Clone this repository to examples/ subdirectory of MC HCK toolchain.
  • cd richcomm-ups-mchck; make
  • Plug MC HCK into USB port; type make flash, press push button on the board, wait ~1 sec and press Enter.
  • lsusb -v now shows MC HCK as "Richcomm UPS emulator".

DEMO

See rcm_handle_data() function that imitates power failure and battery discharge.

You can check your current UPS status with upsc (look for ups.status).

UNLICENSE

This source code is in public domain. For more information, please refer to http://unlicense.org/

richcomm-ups-mchck's People

Contributors

kolontsov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

oh3eqn

richcomm-ups-mchck's Issues

Controllers supported

Would you be able to suggest a similar microcontroller which is sold and would work with this? Considering the mc hck is not sold assembled

My use case is that I develop a monitoring software for a server and got a request to add UPS support. Since I dont own a UPS I thought I could simulate it.

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.