Code Monkey home page Code Monkey logo

tentacle-examples's Introduction

LEGACY NOTICE

Examples for Whitebox Arduino Shileds for Atlas Scientific EZO devices have moved here:

Whitebox Arduino Example Code

Tentacle Examples

This code remains here archived but is not actively maintained anymore.

Example code for Whitebox Labs Tentacle Shields

tentacle-examples's People

Contributors

extrapixel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tentacle-examples's Issues

interactive not working

if i upload the continuous reading sketch to the arduino uno using a tentacle mini with 2 boards attached a PH and an ORP i get continuous data as I would expect. However when I try the interactive example sending a command 99:r I get the associated board to flash a red LED and in the serial monitor I get command failed.. Please help as for my use Im going to want to issue a command for a reading via serial

Incorrect use of the Wire library.

The Arduino Wire library is used incorrectly in the next files:

  1. tentacle-examples/arduino/asynchronous/i2c_asynchronous/i2c_asynchronous.ino
  2. tentacle-examples/arduino/asynchronous/i2c_asynchronous_yun/i2c_asynchronous_yun.ino
  3. tentacle-examples/arduino/continuous/i2c_continuous/i2c_continuous.ino
  4. tentacle-examples/arduino/continuous/i2c_continuous_yun/i2c_continuous_yun.ino
  5. tentacle-examples/arduino/interactive/i2c_interactive/i2c_interactive.ino
  6. tentacle-examples/arduino/interactive/i2c_interactive_yun/i2c_interactive_yun.ino
  7. tentacle-examples/arduino/interactive/mixed_uart_i2c/mixed_uart_i2c.ino
  8. tentacle-examples/arduino/interactive/mixed_uart_i2c_yun/mixed_uart_i2c_yun.ino
  9. tentacle-examples/arduino/tentacle-setup/tentacle_setup/tentacle_setup.ino
  10. tentacle-examples/arduino/tentacle-setup/tentacle_setup_yun/tentacle_setup_yun.ino
  11. tentacle-examples/arduino/tentacle-setup/tentacle_setup_i2c_only/tentacle_setup_i2c_only.ino

The maximum number of bytes to read is 32 for a Wire.requestFrom(). I see 48 many times. The buffer in the Wire library is 32 bytes.

The Wire.endTransmission() may not be used after a Wire.requestFrom(). The Wire.requestFrom() is a complete I2C transaction on its own.
The Wire.endTransmission() on the other hand may not be used on its own to do something, it can only be used when writing data with Wire.beginTransmission() and Wire.write().
When the length of the data is unknown, and no more data is needed, then don't read more data. Nothing else is needed.

When the Wire.requestFrom() returns, the I2C transaction on the bus has completely finished and the received data is waiting in a buffer in the Wire library. That data can be read or not.

There is therefor also no need to read any remaining data from the buffer to "clear" it. If there once was a bug in that situation with the Arduino Zero, that should have been solved long ago.

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.