Which is the I2C library for the spark core? I´ve read that it was the sparkWire… but I didn´t see in the Web IDE
@sparklingdevil , Is this you are looking for?
/**
******************************************************************************
* @file spark_wiring_i2c.h
* @author Satish Nair
* @version V1.0.0
* @date 13-March-2013
* @brief Header for spark_wiring_i2c.c module
******************************************************************************
Copyright (c) 2013 Spark Labs, Inc. All rights reserved.
Copyright (c) 2006 Nicholas Zambetti. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
This file has been truncated. show original
https://github.com/spark/core-firmware/blob/master/src/spark_wiring_i2c.cpp
To use it in your application, you can directly use
Wire.beginTransmission
Wire.write
Wire.read
Wire.endTransmission
etc…
ok, perfect. Many thanks people!
vk2tds
June 14, 2014, 9:53pm
4
Just a quick warning... The I2C library has a 32 byte buffer by default. If you want to do larger transactions you will need to break up your communications.