I’ve added a first draft of a Software section to the Switch Machine Controller page. Links are provided to my GitHub pages where the codes can be found.
I’ve added a first draft of a Software section to the Switch Machine Controller page. Links are provided to my GitHub pages where the codes can be found.
Hello, I am trying to get your code to work however I keep getting a RingBuffer.h error
LikeLike
Do you mean a compile, download, or runtime error?
RingBuffer doesn’t depend on any headers other than Arduino.h, so it should compile fine. You have to limit how big a ring buffer you create, an Arduino has only so much RAM and the ring buffer can’t use it all. And if you’re using small Arduinos like Adafruit Trinkets or Gemmas, they only have about 1/4 the RAM of, say, an UNO.
If these aren’t helpful, can you tell me what kind of error you’re getting?
LikeLike
I should add, the ring buffer memory is not allocated during the compile, so you will probably have no warnings during the download… err… upload about running out of RAM. The buffer is allocated at runtime, so it would be easy to accidentally request too much memory when the RingBuffer constructor executes. Maybe I need to add some error checking there. Anyway, creating a buffer that’s too large is the most likely source of errors.
Have you tried compiling and running the RBTest example program?
LikeLike