Giter Site home page Giter Site logo

ex-ioexpander's People

Contributors

petegsx avatar pmantoine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ex-ioexpander's Issues

[Documentation Update]: Big revamp required

Documentation details

Need to update the documentation with the refactored pin maps, added PWM support, updated protocol info, and so forth.

Page with issues

No response

[To Do]: Clean up compile time warnings in the device driver

Task description

From @habazut , I need to clean up the device driver compile time warnings when compiling with no EX-IOExpander device being created:

I would like if you would have a look at all the warning messages about unused variables when compiling the parts of the CS that should talk to the expander when having none or so. You can force the compiler to accept that a variable is unused by doing the (void) thing:

void foo(int i) { (void)i; return; }

[To Do]: Validate includes

Task description

Need to validate the includes are correct on the servo branch using Arduino IDE due to reported compile errors.

Bug Report: LEDs in output mode are dim

Version

0.0.7/4.2.9pre1

Bug description

When using LED outputs, they are dim.

Using test mode they are bright, but as outputs from EX-RAIL they are dim.

Steps to reproduce the bug

Configure any EX-RAIL sequence to SET() a Vpin on EX-IOExpander, and the LED will turn on but be dim.

Expected behaviour

The behaviour is expected, but the LED should be the same brightness as the test sequence.

Screenshots

No response

Hardware in use

Mega/Nucleo CS
Nano/Uno EX-IOExpander

Additional context

This may potentially be due to continuously setting pin mode rather than only setting it once. It also happens with direct connected LEDs and LEDs connected via ULN2003.

<* EX-IOExpander I2C:0x65 Error:5 (I2C bus timeout) *>

Version

<* EX-IOExpander device found, I2C:0x65, Version v0.0.23 *>

Issue description

<* EX-IOExpander I2C:0x65 Error:5 (I2C bus timeout) >
<
I2C clock speed forced to 400000 Hz >
<
EX-IOExpander device found, I2C:0x65, Version v0.0.23 *>

Hardware

<iDCC-EX V-5.0.0 / MEGA / STANDARD_MOTOR_SHIELD G-3bddf4d>

Bug Report: WAITFOR() not working after servo animations moved to EX-IOExpander

Version

4.2.16/0.0.16

Bug description

WAITFOR() should cause EX-RAIL servo functions to finish before doing the next task in the sequence, but this doesn't work.

Steps to reproduce the bug

Any sequence with WAITFOR() will not wait.

Expected behaviour

EX-RAIL should wait until the servo movement completes before continuing.

Screenshots

No response

Hardware in use

Nucleo F411RE, Nano

Additional context

No response

Bug Report: Nano not working as expected

Version

v4.2.9pre1 (CS), v0.0.6 (EX-IO)

Bug description

Nanos continually marked as offline, reboot does not work with old bootloader, and @momfertje also is seeing Vpin/pin allocations being mismatched.

Uno works exactly as expected.

Nucleo hasn't been properly tested, but at least shows online with correct pins as far as I can see.

Steps to reproduce the bug

  1. Upload v0.0.6
  2. Setup device driver with default pin allocations
  3. Set up an input <S 800 800 1> or using a sequence in EX-RAIL

Expected behaviour

Device should be marked online with correct pin allocations, and an activated input should trigger EX-RAIL or depending on how it's configured.

Screenshots

No response

Hardware in use

Nano - old and new bootloader
Nucleo F411RE (CS)

Additional context

No response

Bug Report: The Outputs A10 to A15 not working

Version

HEAD

Bug description

The outputs A10 to A15 in Arduino Mega are not Working. The log in the JMRI is:

10:59:06.656: [Q 861]  RX: Sensor Reply (Active): Number: 861, State: ACTIVE
10:59:06.660: [Q 860]  RX: Sensor Reply (Active): Number: 860, State: ACTIVE
10:59:06.664: [Q 859]  RX: Sensor Reply (Active): Number: 859, State: ACTIVE
10:59:06.669: [Q 858]  RX: Sensor Reply (Active): Number: 858, State: ACTIVE
10:59:06.673: [Q 857]  RX: Sensor Reply (Active): Number: 857, State: ACTIVE
10:59:06.677: [Q 856]  RX: Sensor Reply (Active): Number: 856, State: ACTIVE

and the outputs are not active.

Steps to reproduce the bug

  1. Set up the outputs from the table with pull up resistors for Arduino Mega.
  2. Leave the outputs without any connection. (They will appear as ACTIVE)
  3. Put the output with GND connection, to simulate the input.

Expected behaviour

In the case of the report, those outputs have to be INACTIVE.

10:59:06.656: [Q 861]  RX: Sensor Reply (Active): Number: 861, State: ACTIVE
10:59:06.660: [Q 860]  RX: Sensor Reply (Active): Number: 860, State: ACTIVE
10:59:06.664: [Q 859]  RX: Sensor Reply (Active): Number: 859, State: ACTIVE
10:59:06.669: [Q 858]  RX: Sensor Reply (Active): Number: 858, State: ACTIVE
10:59:06.673: [Q 857]  RX: Sensor Reply (Active): Number: 857, State: ACTIVE
10:59:06.677: [Q 856]  RX: Sensor Reply (Active): Number: 856, State: ACTIVE

As soon as I connect to them to GND, they has to change to ACTIVE.

Screenshots

No response

Hardware in use

EX-IOExpander (Arduino Mega) + Central (Arduino Mega + Motor Shield + Arduino Netwok Shield )

Additional context

No response

Bug Report: Variable not declard

Version

HEAD

Bug description

The variable is not declared as bool :

#ifdef DIAG
  diag = true;
#else
  bool diag = false;
#endif

The solution is:

#ifdef DIAG
  bool diag = true;
#else
  bool diag = false;
#endif

Steps to reproduce the bug

Not compile if you enable the DIAG compilation variable.

Expected behaviour

Compile.

Screenshots

No response

Hardware in use

EX-IOExpander Arduino Mega

Additional context

No response

Compilation fails for Mega

Version

pre1EXIoexpander

Bug description

Compiling fails with:

Arduino: 1.8.19 (Linux), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

EX-IOExpander:48:1: error: expected ',' or ';' before 'typedef'
typedef struct {
^~~~~~~
EX-IOExpander:52:3: error: 'digitalConfig' does not name a type; did you mean 'digitalPinMap'?
} digitalConfig;
^~~~~~~~~~~~~
digitalPinMap
EX-IOExpander:67:1: error: 'digitalConfig' does not name a type; did you mean 'digitalPinMap'?
digitalConfig digitalPins[NUMBER_OF_DIGITAL_PINS + NUMBER_OF_ANALOGUE_PINS];
^~~~~~~~~~~~~
digitalPinMap
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino: In function 'void loop()':
EX-IOExpander:131:11: error: 'digitalPins' was not declared in this scope
if (digitalPins[dPin].direction == 1) {
^~~~~~~~~~~
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino:131:11: note: suggested alternative: 'digitalPinMap'
if (digitalPins[dPin].direction == 1) {
^~~~~~~~~~~
digitalPinMap
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino: In function 'void receiveEvent(int)':
EX-IOExpander:177:13: error: 'digitalPins' was not declared in this scope
digitalPins[pin].direction = 0;
^~~~~~~~~~~
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino:177:13: note: suggested alternative: 'digitalPinMap'
digitalPins[pin].direction = 0;
^~~~~~~~~~~
digitalPinMap
EX-IOExpander:211:9: error: 'digitalPins' was not declared in this scope
digitalPins[pin].direction = 1; // Must be an input if we got a pullup config
^~~~~~~~~~~
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino:211:9: note: suggested alternative: 'digitalPinMap'
digitalPins[pin].direction = 1; // Must be an input if we got a pullup config
^~~~~~~~~~~
digitalPinMap
EX-IOExpander:244:9: error: 'digitalPins' was not declared in this scope
digitalPins[dPin].direction = 0;
^~~~~~~~~~~
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino:244:9: note: suggested alternative: 'digitalPinMap'
digitalPins[dPin].direction = 0;
^~~~~~~~~~~
digitalPinMap
EX-IOExpander:253:31: error: 'digitalPins' was not declared in this scope
digitalOutBuffer[0] = digitalPins[dPin].state;
^~~~~~~~~~~
/home/ross/Pictures/marklin/electronics/arduino/EX-IOExpander/EX-IOExpander.ino:253:31: note: suggested alternative: 'digitalPinMap'
digitalOutBuffer[0] = digitalPins[dPin].state;
^~~~~~~~~~~
digitalPinMap
exit status 1
expected ',' or ';' before 'typedef'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Needs a ; at line 59 in SupportedDevices.h

Steps to reproduce the bug

  1. Compile in arduino ide with board selected as Arduino Mega 2560

Expected behaviour

Should compile correctly with ; at line 59 in SupportedDevices.h

Screenshots

No response

Hardware in use

EX-IOExpander arduino mega 2560

Additional context

No response

[Feature Request]: more reliable bus for accessories

Problem/idea statement

I don't know how reliable I2C bus is on bigger layouts, but I'm afraid not perfect. What about using UART TTL or even better RS485.

Alternatives or workarounds

No response

Additional context

No response

Bug Report: Analogue Inputs not working

Version

EX-CS v4.2.31, EX-IO v0.0.17

Bug description

Analogue inputs do not trigger/aren't read correctly.

Steps to reproduce the bug

Configure any sequence to trigger something or read an analogue input, and this will not work.

Expected behaviour

Analogue inputs should be read successfully.

Screenshots

No response

Hardware in use

F411RE/Nano

Additional context

This appears to be an issue with the pin map being transmitted from the EX-IO device to the device driver, meaning that the data is not associated with the correct Vpin.

[Feature Request]: Enable wireless connectivity

Problem/idea statement

Being able to connect EX-IOExpander to the CommandStation using wireless would be a great feature, solving I2C bus distance issues on larger layouts.

Alternatives or workarounds

No response

Additional context

No response

Bug Report: Activating last digital pin as an input activates multiple digital pins

Version

v4.2.14pre1 (CS) v0.0.13 (EX-IO)

Bug description

When using the very last Vpin as a digital input pin using IF() in EX-RAIL, when it activates, other digital input pins also activate.

Steps to reproduce the bug

Use IF(815) in an EX-RAIL sequence, with other Vpins defined with IF() statements also.

Expected behaviour

Each digital input should operate independently of one another.

Screenshots

No response

Hardware in use

Nucleo F411RE (CS)
Nano (EX-IO)

Additional context

This seems to occur when using bit shifting techniques in the device driver, whereas using Arduino bitRead() function results in correct operation.

This triggers the bug:
bool value = _digitalInputStates[pinByte] >> (pin - pinByte * 8);

This operates correctly:
bool value = bitRead(_digitalInputStates[pinByte], pin - pinByte * 8);

[Feature Request]: Add support for interactive configuration of I2C address

Problem/idea statement

It would be beneficial to make use of EEPROMs where possible and a command via the serial console to configure the device's I2C address.

This means for appropriate platforms with EEPROM support, zero configuration to the software is required, and a device can be configured entirely via the serial console when uploading the sofware.

Alternatives or workarounds

No response

Additional context

No response

Bug Report: Note declared

Version

HEAD

Bug description

Not declared variables of I2C fro Arduino mega.

Solution: In the file arduino_avr_mega.h, you have to add this definition variables:

#define I2C_SDA 20
#define I2C_SCL 21

Steps to reproduce the bug

  1. Run in Arduino Mega the Ex pander.
  2. Declare som VPins
  3. Always apear the error in the central:

Vpin XXX cannot be used as a digital input pin

Expected behaviour

Declared the VIO pins.

Screenshots

No response

Hardware in use

Arduino Mega

Additional context

No response

Bug Report: Compilation detects incorrect board

Version

0.0.2alpha

Bug description

When compiling with PlatformIO on an Arduino Uno, it is detected as a Nano.

Steps to reproduce the bug

  1. Upload to Arduino Uno
  2. The serial console reflects the board is a Nano
  3. Configure device driver in EX-Commandstation for default Uno device as per documentation
  4. On startup, device reports configuration error and is taken offline

Expected behaviour

When compiling and uploading, it should detect an Arduino Uno.

Screenshots

No response

Hardware in use

Nucleo STM32 F411RE + Arduino R3 shield (EX-CS)
Arduino Uno (EX-IO)

Additional context

myHal.cpp:

`#if !defined(IO_NO_HAL)

// Include devices you need.
#include "IODevice.h"
#include "IO_EXIOExpander.h"

//==========================================================================
// The function halSetup() is invoked from CS if it exists within the build.
// The setup calls are included between the open and close braces "{ ... }".
// Comments (lines preceded by "//") are optional.
//==========================================================================

void halSetup() {
EXIOExpander::create(800, 16, 0x65, EXIO_UNO_DIGITAL_PINS, EXIO_UNO_ANALOGUE_PINS);
}

#endif`

Bug Report: displaying wrong version

Version

v0.0.3 alpha

Bug description

When issuing serial returns wrong version:

<* EX-IOExpander I2C:x65 Configured on Vpins:800-817 *> **<* EX-IOExpander x65 using driver version IN *>** <* EX-IOExpander x65: Digital Vpins 800-811, Analogue Vpins 812-817 *> <* Arduino Vpins:2-69 *>

Steps to reproduce the bug

issue in Serial Monitor (CS Side)

Expected behaviour

should display the correct EX_IOexpander version

Screenshots

No response

Hardware in use

Mega Clone with DEEK ROBOT Motor Shield Special CS version 4.2.7pre

Nano (old bootloader) 0.0.3 EX_IOepxander

Additional context

No response

[To Do]: Optimise read speed

Task description

Both digital and analogue reads are done one pin at a time at present, meaning reading all digital pins in particular will take too long to be optimal.

Need to consolidate all digital reads into a single buffer, and same with analogue reads to optimise this.

[Documentation Update]: Add Pro Mini, F412ZG, and tests in myConfig.h

Documentation details

Pro Mini has been added, need to document this along with the F412ZG when it is done, and enabling the test sequences via myConfig.h needs to be added.

Also need to ensure doco is clear that serial commands are executed directly on the device, not on the CommandStation.

Page with issues

No response

[To Do]: Prevent using digital pins as analogue and vice versa

Task description

Once the device driver is loaded and EX-IOExpander is configured with the digital and analogue pin counts, trying to use a defined digital pin as an analogue pin should fail (and vice versa). At the moment it will be allowed and may cause unexpected outcomes.

Bug Report: STM32 I2C communication issues

Version

0.0.18/4.2.16+

Bug description

Nucleo F412ZG does not get configured correctly by the device driver.

The F412ZG correctly sends the initialisation command back to the device driver, but an incorrect byte value is received.

Steps to reproduce the bug

Connect F412ZG to the CommandStation via I2C and enable the HAL device.

Expected behaviour

The F412ZG should be configured and reported online.

Screenshots

No response

Hardware in use

Nucleo F411RE (CS)
Nucleo F412ZG (EX-IOExpander)

Additional context

No response

[Feature Request]: Enable PWM support

Problem/idea statement

It would be great to also be able to drive servos and control LED brightness from EX-IOExpander as per the PCA9685, especially if there is a use case for only one or two servos that can't really justify a dedicated PCA9685 board.

Alternatives or workarounds

None available at present.

Additional context

No response

[Feature Request]: Allow disabling I2C pullups

Problem/idea statement

It would be good to have a way to disable the I2C pullups on an EX-IOExpander device when using it in an I2C bus with other devices to ensure the resistance doesn't become too low for the bus to work, and increase reliablity.

Alternatives or workarounds

The only way to do this is to edit the code and execute digitalWrite(A4, LOW) and digitalWrite(A5,LOW) after Wire.begin() on a Nano/Uno for example to turn the pullups off.

Additional context

No response

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.