Skip to content

Timer-based Arduino SONY S-LINK/Control-A1 Protocol Library for ESP8266

Notifications You must be signed in to change notification settings

wigster/ESP8266_Slink

 
 

Repository files navigation

ESP8266_Slink

ESP8266 SONY S-LINK/Control-A1 Library.

This library allows control of Sony Home Entertainment Devices via Sony S-link/Control-A1/Control A-1 II.

(C) Tyler Goulding, 2020, CC-BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0/

The library is designed specifically for an ESP8266. I may provide support for other devices if needed. The library makes uses of hw timer 0 so do not use take control of the timer for your own needs.

For hardware, make sure to connect the slink line via a 220R and preferably a diode. I have been running it without a diode simply because I had no free ones when I made this library. If you are only controlling a single device, then this should be fine. If you are driving a full home entertainment system, use a diode to limit current in the case of collisions.

This library is based off Ircama's Sony SLink library: https://github.com/Ircama/Sony_SLink.git

Installation

Go to the libraries directory in your Arduino folder. and clone this repo

$ cd path/to/Arduino/libraries
$ git clone https://github.com/tylerGoulding/ESP8266_Slink.git

Usage

To use the library in your own sketch, select it from Sketch > Import Library.

Example

Simplest example of using this library:

#define CTRL_A1_PIN 2 // S-Link Control-A1 pin

#include "ESP8266_Slink.h"
Slink slink;

void setup() {
  slink.init(CTRL_A1_PIN); // Set-up S-Link pin
  slink.sendCommand(SLINK_DEVICE_AMP, SLINK_CMD_AMP_POWER_ON);
}

void loop() {
}

Check the examples directory for further examples.

Description of the functions

slink.init(slinkPin) - set-up S-Link pin

slink.sendCommand(device, command) - send a command to the device;

Notes

Special thanks to Ircama. His code provided the timing and protocol. I simply made it timer based and work on an ESP8266.

Code heavily based on

Ircama's code heavily based on:

The following are reference documents compiled by Ircama as well:

Tested with a Sony STR-DA50ES receiver/amplifier. Service manual: http://sportsbil.com/sony/STR/STR-D/STR-DA30ES_DA50ES_V55ES_v1.1.pdf

Feel free to share this source code, but include explicit mention to the author. Licensed under creative commons - see http://creativecommons.org/licenses/by-sa/4.0/

About

Timer-based Arduino SONY S-LINK/Control-A1 Protocol Library for ESP8266

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%