Giter VIP home page Giter VIP logo

at24cx's People

Contributors

cyberp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

at24cx's Issues

Configuration Error

Is not possible to change te I2C adress, only changing in the file AT24CX.h like shown below.
// AT24Cx I2C adress
// 80
// 0x57
#define AT24CX_ID B1010111

Not able to use with Struct

Can any guide available how to use this library with Struct in Arduino ?

I have custom struct with more than 10 fields. i need to store data using this library

Library doesn't work with newer Arduino boards because Wire.begin called too early

I've seen this issue a few times where wire.begin is called before setup starts (IE global scoped variable), and it seems to hang on most recent Arduino builds.

Any easy fix is to defer the Wire.begin call until the first write or read attempt is made.

I'll submit a PR from my fork should you wish to accept. I've tested it on a SAMD32 board.

Documentation error

The info page says "uses the device with index 0 and given page size. You can select a device with given index between 0 and 8 with constructor" but I believe this should read "between 0 and 7" as there are only 8 possible addresses, not 9.

problem with readInt()

#include <AT24CX.h>

AT24C32 EepromRTC(0x57);

void setup()
{
EepromRTC.writeFloat(2,4.56);
EepromRTC.writeInt(8, 0);
EepromRTC.writeLong(13, 560);
EepromRTC.writeFloat(19, 5.56);
EepromRTC.writeFloat(25, 7.57);
EepromRTC.writeFloat(31, 7.87);
EepromRTC.writeFloat(37, 5.76);
EepromRTC.writeFloat(43, 9.88);
EepromRTC.writeInt(50, 999);

consigna_caudal = EepromRTC.readFloat(2);
AlarmDetectCount = EepromRTC.readInt(8);
totalizadorKm3 = EepromRTC.readLong(13);
M_nivel_v_CM = EepromRTC.readFloat(19);
B_nivel_v_CM = EepromRTC.readFloat(25);
L_metros = EepromRTC.readFloat(31);
Sf = EepromRTC.readFloat(37);
n_ru = EepromRTC.readFloat(43);
isVirtualManEn = EepromRTC.readInt(50);

SerialMon.print(" consigna_caudal ");
SerialMon.println(consigna_caudal );
SerialMon.print(" totalizadorKm3 ");
SerialMon.println(totalizadorKm3 );
SerialMon.print(" AlarmDetectCount ");
SerialMon.println(AlarmDetectCount );
SerialMon.print(" M_nivel_v_CM ");
SerialMon.println(M_nivel_v_CM );
SerialMon.print(" B_nivel_v_CM ");
SerialMon.println(B_nivel_v_CM );
SerialMon.print(" L_metros ");
SerialMon.println(L_metros );
SerialMon.print(" Sf ");
SerialMon.println(Sf );
SerialMon.print(" n_ru ");
SerialMon.println(n_ru );
SerialMon.print(" isVirtualManEn ");
SerialMon.println(isVirtualManEn);

RESULT:

9:31:05.938 -> consigna_caudal 4.56
19:31:05.938 -> totalizadorKm3 560
19:31:05.938 -> AlarmDetectCount 1083244544
19:31:05.938 -> M_nivel_v_CM 5.56
19:31:05.938 -> B_nivel_v_CM 7.57
19:31:05.938 -> L_metros 7.87
19:31:05.938 -> Sf 5.76
19:31:05.938 -> n_ru 9.88
19:31:05.938 -> isVirtualManEn 1092486119

For me float, long work well, but with int i have this problem. in workin in ESP32

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.