GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ByteConvert_cpp/README.md at master · SloCompTech/ByteConvert_cpp

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
51 lines (33 loc) · 1.84 KB
/

README.md

Copy path

File metadata and controls

51 lines (33 loc) · 1.84 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Byteconvert

ByteConvert

Build Status Packagist

What's about ?

Have you ever wanted to transmit int,short,long or any other numeric type over I2C,SPI,serial or other protocol or bus, but you converted variable to string to be able to transmit it char by char. This library enables you to convert any numeric value to bytes or other way around and you can also print array of bytes.

What you need to consider, when you are using this library

When you are using this library, you need to consider variable byte size, because if you are using different platforms, then there may be some errors, because int on platform 1 has 4 bytes and int on platform 2 may has 2 bytes.

What you need to install this project ?

You need python3, ninja and meson.

sudo apt-get install python3 python3-pip ninja-build
sudo pip3 install meson

Installing

meson build
ninja -C build
ninja -C build test
ninja -C build install

# Or simply
make
sudo make install

If you have problems, that library can't be found run sudo ldconfig /usr/local/lib/x86_64-linux-gnu/ if you haven't changed prefix, else modify path.

How to include library to your c or c++ project ?

It's simple. At the top of your source file include library:

#include <ByteConvert/ByteConvert.hpp>

And when you compile add flag -lbyteconvert, example g++ -std=c++11 MyProject.cpp -lbyteconvert -o MyProject.

Examples

See examples folder

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.