Giter Club home page Giter Club logo

arduino-libraries's People

Contributors

fpo avatar gandy92 avatar heikobornholdt avatar ivankravets avatar lauszus avatar marcelrv avatar paulstoffregen avatar per1234 avatar sept0r avatar shirriff avatar thijse avatar toddtreece avatar valkuc 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-libraries's Issues

Compile error on readBinArg<T>()

in this code snippet:

  template < class T > T readBinArg ()
  {
    if (next ())
      {
        dumped = true;
        return readBin < T > (current);
      }
      return (T)0;
  }

seems that you want to convert a buffer to a class T, but if T is not a int or something that can be converted from 0, there will be a error when compiling this function.
May be return the pointer to T is a better choice?

buffer overflow warning in CmdMessenger.cpp

in CmdMessenger.cpp, line 304 may overflow the msg buffer, suggest to use sizeof(msg) instead of 188.

298 void CmdMessenger::sendCmdfArg(char *fmt, ...)
299 {
300     if (startCommand) {
301         char msg[128];
302         va_list args;
303         va_start (args, fmt );
304         vsnprintf(msg, 188, fmt, args);
305         va_end (args);
306 
307         comms->print(field_separator);
308         comms->print(msg);
309     }
310 }

EEPROMEx new features request

Hi, I really enjoy with your read/write templates. But when I tried to reuse your library I stuck with many restrictions:

  1. I need to change "cpp" source to disable #define _EEPROMEX_DEBUG. IMHO better way to use #ifndef _EEPROMEX_DEBUG true. It will allow disable debugging and use unchanged library
  2. I tried too inherit your class and reuse most of code with my external memory on I2C AT24C32 chip. But:
  • hardware eeprom_read... calls are spreaded over whole code
  • readByte(), writeByte(), isWriteOk() and isReady() are not virtual
  1. I've application witch work during long period. I want to check _memSize, but not _allowedWrites at the same time
  2. In templates wrong check for last byte . For example isWriteOk(address+sizeof(value)) should be changed to isWriteOk(address+sizeof(value)-1)

I hope my contribution useful.
Thanks,
Evgeny

EEPROMex build fails on newer avr-g++

EEPROMex can no longer be built using newer versions of gcc. It builds successefully on the Arduino-supplied avr-gcc 4.3, however building it using arduino-mk on a gcc 4.7 fails. GCC complains about conflicting definitions of EEPROM in EEPROMEx/EEPROMex.h:159.

In attempt to track this down further I ran the build in the Arduino IDE with full output. On gcc 4.3 this is a warning - possibly resulting in undefined behaviour? (I.e., sometimes EEPROM is used, sometimes EEPROMex)

So it seems that using EEPROMex as a drop-in replacement for EEPROM is no longer possible and at least the name of the global variable should be changed, e.g. from EEPROM to EEPROMex.

Another (possibly better) solution might be to replicate the necessary code from EEPROM in EEPROMex and eliminate the #include <EEPROM.h>. Otherwise, an instance of the EEPROM library may hang around costing valuable memory (Disclaimer: I'm no expert on what optimizations GCC can and will do in this case).

mono & Linux

Hi,

I'd like to use CmdMessanger with Linux.

My Arduino devices are listed as /dev/ttyACM*

_serialTransport.CurrentSerialSettings.PortNameCollection Does not list these devices. It does not seem to be a rights problem, as starting the Program as root does not help either. I also created a symlink sudo ln -s /dev/ttyACM0 /dev/ttySACM0 which got listed. Using this Symlink works but is no permanent solution.

According to this Bug report, this seems to be a mono Problem:
https://bugzilla.novell.com/show_bug.cgi?id=795366#c0

Anyway. I don't think I am the only Linux user, who to uses CmdMessanger. How do you solve this issue?

Error reading a structure

Hi I am using WriteBlock () function to save a structure, everything works fine, but when I unplug the card and flip on the read data is not exactly what keep bringing but a kind of special characters

This is the code I use to save

String readString = "write,192.168.0.189,http://sisfo.com/temp.php,5";
configurationValue.ip = getValue(readString,',',1);
configurationValue.url = getValue(readString,',',2);
configurationValue.time = getValue(readString,',',3);
EEPROM.WriteBlock(1, configurationValue);

This is the code i use to read
EEPROM.readBlock(1, configurationValueOut);

EEPROMex not able to locate EEPROM.h and WProgram.h

Arduino: 1.6.3 (Windows 8.1), TD: 1.23, Board: "Arduino Uno"

Build options changed, rebuilding all

Using library Time in folder: C:\Users\ASUS-PC\Documents\Arduino\libraries\Time

Using library EEPROMex in folder: C:\Users\ASUS-PC\Documents\Arduino\libraries\EEPROMex (1.0.x format)

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10603 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\ASUS-PC\Documents\Arduino\libraries\Time -IC:\Users\ASUS-PC\Documents\Arduino\libraries\EEPROMex C:\Users\ASUS-PC\AppData\Local\Temp\build8141211403291303415.tmp\EEPROMBackup.cpp -o C:\Users\ASUS-PC\AppData\Local\Temp\build8141211403291303415.tmp\EEPROMBackup.cpp.o

In file included from EEPROMBackup.pde:17:0:

C:\Users\ASUS-PC\Documents\Arduino\libraries\EEPROMex/EEPROMex.h:23:20: fatal error: EEPROM.h: No such file or directory

#include <EEPROM.h>

                ^

compilation terminated.

Error compiling.

if I include EEPROM in my main code then I get same problem with WProgram.h

I am using ardiuino 1.6.3...

rCT rPW issue

Hey there,

I don't seem to be getting signals with the internal clock sync.

Is this a hardware and antenna placement issue?

screen shot 2017-05-03 at 09 14 06

Suggested change to setMaxAllowedWrites

It should be possible to turn off the max allowed writes check. I suggest the unix way: when argument is zero it means 'no check'. In the code

if (_allowedWrites > 0 && ( _writeCounts > _allowedWrites) ) {

Custom memory size

Hello,

Is it possible add custom memory sizes ?
something like:
#define EEPROMSizeATmega1280 4096
#define EEPROMSize4M 4096
#define EEPROMSize8M 8192
#define EEPROMSize16M 16384
#define EEPROMSize32M 32768

updateByte gives error "Exceeded maximum number of writes"

When setting:
const int maxAllowedWrites = 1;
and using the updateByte function I get the error: "Exceeded maximum number of writes".

this does NOT happen if:
const int maxAllowedWrites = 2;

if I use writeByte and
const int maxAllowedWrites = 1;
the error does not appear.

function sendCmd(int cmdId) doesn't exist

The documentation on the Arduino website indicates that there's a sendCmd function available that doesn't require an argument (http://playground.arduino.cc/Code/CmdMessenger#.UzzMza1dWH8):

"When sending a command without parameters, the format is

sendCmd (int cmdId)"

However, when trying to call this method with a CmdMessenger object, I get the following error:

error: no matching function for call to 'CmdMessenger::sendCmd()'

The CmdMessenger file doesn't seem to include such a function in the header file. Is this function no longer supported?

Could you make releases

GitHub doesn't let you programmatically download individual files but it does let you create Releases which can be downloaded. Could you tag your latest version as a 'release' so I can download it?

I'm working on a new IDE just for Arduino which will automatically download libraries when you use them, so having releases makes a huge difference. Otherwise the IDE has to check out the entire repo.

Spaces vs tabs

Hi,
Great library, thanks!

One quick comment: the header file looks ugly, because of tabulations issues:

void     setMemPool(int base, int memSize);
void     setMaxAllowedWrites(int allowedWrites);
int      getAddress(int noOfBytes);
uint8_t  read(int); 
bool     readBit(int, byte);
uint8_t  readByte(int);
uint16_t readInt(int);
uint32_t readLong(int);
float    readFloat(int);
double   readDouble(int);   
bool     write(int, uint8_t);
bool     writeBit(int , uint8_t, bool);

Btw, the now widely-adopted convention adopted by the majority of recent large-scale projects is to use spaces instead of tabs.

Best,
Arthur

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.