Generalized easy to use SPI library for Arduino designed mainly for immense data transfer through multiple slaves. This library features Cyclic Redundancy Check (CRC) and user defined data transfer which inspired by Nick Gammon.

SPI Master and Slave Library

Github stars Open in Visual Studio Code Build with PlatformIO PRs Welcome

If you don't have VS Code you can install from here. After downloading click extensions and type and install PlatformIO IDE. Then select your arduino board and upload. Source codes have to be located in /src folder, so if you want to upload slave code then move master.cpp to /test and slave.cpp back to /src folder. Libraries are located in /lib.

For demonstrating purpose it could have multiple slaves, but it is okay that all the slaves have the same code.

Usage for Master

Master master; // creating Master type variable.
master.setup(SLAVE_PIN); // setup the master. 
master.setCurrentAngle(7); // set the currentAngle variable.
master.setMotorID(8);      // set the motorID variable.
master.setTargetAngle(9);  // set the targetAngle variable.
master.enable(SLAVE_PIN); // opening the slave for transmission.
master.write(SLAVE_PIN); // sending the data from bus.
master.disable(SLAVE_PIN); // closing the slave for transmission.

Usage for Slave

Slave slave; // creating Slave type variable.
slave.setup(); // setup the slave.
slave.read(slave); // reading the data from bus.
Owner
Samir Teymurov
Robotics Engineer
Samir Teymurov
Similar Resources

This repository gives an idea about how to use UART/SPI/I2C communication using HAL APIs

STM32-UART-SPI-I2C communication with Arduino board using HAL APIs This repository gives an idea about how to use UART/SPI/I2C communication using HAL

Nov 1, 2021

Project to check which Nt/Zw functions your local EDR is hooking

Probatorum EDR Userland Hook Checker Probatorum will check which Nt/Zw functions your local EDR is hooking. Most credit for this code goes to SolomonS

Nov 15, 2022

WTD is a python tool for replacing values with the C preprocessor macro which defined them.

Where's That Define WTD is a python tool for replacing values with the C preprocessor macro which defined them. An example of this is when trying to u

Mar 28, 2022

Small and dirty header-only library that supports user input with some more advanced features than in the standard lib.

dirty-term Small and dirty header-only library that supports user input with some more advanced features than in the standard lib. This small, lightwe

Apr 24, 2022

Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.

Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.

Apex-Legends-SDK Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified sou

Jan 8, 2023

Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature

About This repository contains: Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature Public set o

Sep 30, 2022

Repository for the App Dev Bootcamp conducted in Spring 2022 for IECSE. Bootcamp mainly focuses on Flutter and Dart.

IECSE-AppDev-Spring-2022 Welcome to IECSE's App Dev Bootcamp, Spring'22. Ever wondered how applications like Instagram, WhatsApp, and others are built

Jul 18, 2022

Handcrafted Flutter application well organized and easy to understand and easy to use.

Handcrafted Flutter application well organized and easy to understand and easy to use.

Feb 1, 2022

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas.

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas.

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas. With a theoretical transmission range of 10 miles (16kms), OTG messenger can be used by groups of people to stay connected when they are in areas not serviced by mobile connectivity.

Dec 10, 2022
A MCBE dll mod (mainly for testing) which modifies some piston functions
A MCBE dll mod (mainly for testing) which modifies some piston functions

PistonFuckery A MCBE dll mod (mainly for testing) which modifies some piston functions. The current version modifies PistonBlockActor::_checkAttachedB

Apr 24, 2022
Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Oct 8, 2022
C64 Watch is a customized T-Watch 2020 that was inspired by the Commodore 64 computer. It features a C64 theme and a built-in BASIC interpreter.
C64 Watch is a customized T-Watch 2020 that was inspired by the Commodore 64 computer. It features a C64 theme and a built-in BASIC interpreter.

C64 Watch C64 Watch is a customized T-Watch 2020 that was inspired by the Commodore 64 computer. It features a C64 theme and a built-in BASIC interpre

Nov 26, 2022
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE

INSTRUCTIONS - The codes for the Fingerprint Door lock are present in the Code For Fingerprint Door Lock folder The instructions of how to operate the

Mar 3, 2022
Windows 11 compability check with user friendly output
Windows 11 compability check with user friendly output

Win11SysCheck Windows 11 compability check software with user friendly output GUI available as experimental release in experimental_ui branch Contribu

Oct 11, 2022
Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.
Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.

Cobalt Strike User-Defined Reflective Loader Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities. B

Jan 3, 2023
My_Shell is a user-deļ¬ned interactive shell written in C that works similar to the original shell in linux

MY_SHELL Overview My_Shell is a user-defined interactive shell written in C that works similar to the original shell and it can execeute many of the l

Nov 22, 2021
BokuLoader - Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.
BokuLoader - Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.

BokuLoader - Cobalt Strike Reflective Loader Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities. B

Dec 31, 2022
ToPS is an objected-oriented framework implemented using C++ that facilitates the integration of probabilistic models for sequences over a user defined alphabet

ToPS is an objected-oriented framework implemented using C++ that facilitates the integration of probabilistic models for sequences over a user defined alphabet

Aug 2, 2022
std::tuple like methods for user defined types without any macro or boilerplate code

Boost.PFR This is a C++14 library for very basic reflection that gives you access to structure elements by index and provides other std::tuple like me

Dec 23, 2022