Code Monkey home page Code Monkey logo

evshield's People

Stargazers

 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

evshield's Issues

Motor briefly runs at full speed when first plugged in or encoder reset

To replicate add this line to the end of setup in the MotorEncoder example:

evshield.bank_a.motorRunUnlimited(SH_Motor_1, SH_Direction_Forward, SH_Speed_Slow);

Upload the program and press GO to start it. Notice when you hit the left arrow to reset the encoder positions the motor is set to full speed for a moment before losing its momentum and dropping back to SH_Speed_Slow. Also unplug and reconnect the motor, a similar issue occurs.

Now replace that line with:

evshield.bank_a.motorRunUnlimited(SH_Motor_1, SH_Direction_Forward, SH_Speed_Fast);

Notice (by ear) there is little-to-no difference in speed.

Non void functions that has no return statements (undefined behavior)

I see a lot of functions in the code where the return statement is missing or is kept inside if blocks that may not execute. I am very surprised to see such badly written code which doesn't conform to any standards. Does anyone know the reasoning for this?

An example:

uint8_t EVShieldBank::motorWaitUntilTachoDone(SH_Motor which_motors)
{
  uint8_t s;
  delay(50);  // this delay is required for the status byte to be available for reading.
  s = motorIsTachoDone(which_motors);
  while (( s & SH_STATUS_TACHO ) != 0 ) {
    delay (50);
    s = motorIsTachoDone(which_motors);
  }
}

How to connect RC Battery Pack Connector cable to EVShield

I cannot figure out how to connect a RCBCONN01 RC Battery Pack Connector cable to my EVShield with Arduino Uno compatible board bundle,
I spliced the cables on the battery pack connector and tried to insert them into the green jack on the EVShield.
However, they do not click in or attach firmly as I thought they would
I must be missing something - but I cannot see it

Thanks for any help

Several motor status flags not implemented

I'm missing some of the defined motor status flags (defined in evshield.h). Actually there is no way to detect stall or overload.
Why is in evshield.cpp SH_MOTOR_STALL commented?
Also the following flags aren't implemented?
SH_STATUS_RAMP
SH_STATUS_MOVING
SH_STATUS_BREAK
SH_STATUS_OVERLOAD

Thanks in advance.

twi.h compile error

Doing initial tests and had problem with twi.h when compiling. Resolved error by replaced changing code in BaseI2CDevice to:

extern "C" {

if ( ARDUINO == 10608 )

//#include "../../hardware/arduino/avr/libraries/Wire/src/utility/twi.h"
//above code throws error - below allows to compile - absolute addressing is a problem for libraries

include "utility/twi.h"

elif ( ARDUINO == 10605 )

include "../../hardware/arduino/avr/libraries/Wire/utility/twi.h"

else

uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t, uint8_t);

endif

}

Not sure if this problem exists in other code - will check when I do more testing.

softi2c does not build

softi2c doesnt build.
this is caused by the following:
uint8_t* SoftI2cMaster::readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t* buf){
//delay(20);
if (!buf) buf = _so_buffer;
bytes = min(bytes,BUFF_LEN); // avoid buffer overflow
memset(buf, 0, BUFF_LEN);
_error_code = 0;
// issue a start condition, send device address and write direction bit
if (!start(deviceAddr | I2C_WRITE)) {
_error_code = 2;
return false;
}

the compiler does not allow to return false as an uint8_t*.
for c++11 this should be the nullptr.

SH_Completion_Wait_For does not work

When using the motor control functions motorRunSeconds, motorRunTachometer, motorRunDegrees, and motorRunRotations, the SH_Completion_Wait_For parameter does not work reliably. Mindsensors support team is currently working on a fix for this issue.

Speed of Motor 1 on Bank A

Speed is not controllable on Bank A Motor 1 when using Arduino IDEs that have an I2C frequency other than 50000. Mindsensors support is currently working on a fix for this issue.

Issue with EVShield not responding.

I have 13 evshields. 3 of them have problems syncing. This problem is significantly worse with the Arudino Uno clones that come with the EvShields but exist on Ardunio Brand and DFRobot brands as well.

We are using a touch and drive example as a basis for this but the problem also exists when trying to upload default Blink to the device with the shield mounted. When you remove the shield it loads just fine.

Any ideas:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : COM13
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x84
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x84
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x84
avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x84
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x84
avrdude: ser_drain(): read error: The device does not recognize the command.

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected
processing.app.SerialException: Error opening serial port 'COM13'.
at processing.app.Serial.(Serial.java:147)
at processing.app.Serial.(Serial.java:82)
at processing.app.SerialMonitor$4.(SerialMonitor.java:101)
at processing.app.SerialMonitor.open(SerialMonitor.java:101)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:104)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2080)
at processing.app.Editor.access$1500(Editor.java:114)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2058)
at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - COM13; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.(Serial.java:136)
... 8 more
Error opening serial port 'COM13'.

Writing to motors on different banks

When writing to motors on different banks there is sometimes a loss. We have seen not every command is executed and motor control can be unreliable. Mindsensors support team is currently working on a fix for this issue.

Running Both Motors on Bank B

When running both motors synchronously on Bank B using motorRunSeconds, motorRunRotations, motorRunDegress, or motorRunTachometer, the motors will not perform as desired. Mindsensors.com is currently working on this issue.

Name case mismatch

BaseI2CDevice.cpp is including MSTimer2.h but the file is named MsTimer2.h.

Error: infrared_remote. How to solve this?

Hello, goodafternoom!
When compiling the example of the infrared remote, the following error appears: Arduino: 1.6.8 (Windows 7) Sign: "Arduino / Genuino Uno"

C: \ Program Files \ Arduino \ arduino-builder -dump-prefs = -logger machine -Hardware "C: \ Program Files \ Arduino \ hardware" -Hardware "C: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages" -tools "C: \ Program Files \ Arduino \ tools-builder" -tools "C: \ Program Files \ Arduino \ hardware \ tools \ avr" -tools "C: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages" Built-in-libraries "C: \ Program Files \ Arduino \ libraries" -libraries "C: \ Users \ ADM \ Documents \ Arduino \ libraries" -fqbn = arduino: avr: one -IDE-version = 10608 -build- path "C: \ Users \ ADM \ AppData \ Local \ Temp \ build3c5ad1a17d445500f860adf0108a19ff.tmp" -warnings = none -prefs build.warn_data_percentage = = 75 -verbose "C: \ Users \ ADM \ AppData \ Local \ Temp \ arduino_modified_sketch_68117 \ infrared_remote .ino "
C: \ Program Files \ Arduino \ arduino-builder -compile -logger = machine -Hardware "C: \ Program Files \ Arduino \ hardware" -Hardware "C: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages" -tools "C: \ Program Files \ Arduino \ tools-builder" -tools "C: \ Program Files \ Arduino \ hardware \ tools \ avr" -tools "C: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages" -Built -in-libraries "C: \ Program Files \ Arduino \ libraries" -libraries "C: \ Users \ ADM \ Documents \ Arduino \ libraries" -fqbn = arduino: avr: one -IDE-version = 10608 -build-path " C: \ Users \ ADM \ AppData \ Local \ Temp \ build3c5ad1a17d445500f860adf0108a19ff.tmp "-warnings = none -prefs build.warn_data_percentage = = 75 -verbose" C: \ Users \ ADM \ AppData \ Local \ Temp \ arduino_modified_sketch_68117 \ infrared_remote.ino "
changed build options, recompiling all
"C: \ Program Files \ Arduino \ hardware \ tools \ avr / bin / avr-g ++" -c -g -w -The -std = gnu ++ 11 -fno-exceptions -ffunction-sections -fdata-sections -fno -threadsafe-statics -w -x c ++ -E -DC -mmcu = ATmega328P -DF_CPU = 16000000L -DARDUINO = 10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ colors \ arduino "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ variants \ standard " "C:\Users\ADM\AppData\Local\Temp\build3c5ad1a17d445500f860adf0108a19ff.tmp\sketch\infrared_remote.ino.cpp" -o "nul"
"C: \ Program Files \ Arduino \ hardware \ tools \ avr / bin / avr-g ++" -c -g -w -The -std = gnu ++ 11 -fno-exceptions -ffunction-sections -fdata-sections -fno -threadsafe-statics -w -x c ++ -E -DC -mmcu = ATmega328P -DF_CPU = 16000000L -DARDUINO = 10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ colors \ arduino "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ variants \ standard "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ libraries \ Wire \ src " "C:\Users\ADM\AppData\Local\Temp\build3c5ad1a17d445500f860adf0108a19ff.tmp\sketch\infrared_remote.ino.cpp" -o "nul"
"C: \ Program Files \ Arduino \ hardware \ tools \ avr / bin / avr-g ++" -c -g -w -The -std = gnu ++ 11 -fno-exceptions -ffunction-sections -fdata-sections -fno -threadsafe-statics -w -x c ++ -E -DC -mmcu = ATmega328P -DF_CPU = 16000000L -DARDUINO = 10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ colors \ arduino "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ variants \ standard "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ Arduino \ hardware \ avr \ 1.6.11 \ libraries \ Wire \ src "" -IC: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield-master " "C:\Users\ADM\AppData\Local\Temp\build3c5ad1a17d445500f860adf0108a19ff.tmp\sketch\infrared_remote.ino.cpp" -o "nul"
"C: \ Program Files \ Arduino \ hardware \ tools \ avr / bin / avr-g ++" -c -g -w -The -std = gnu ++ 11 -fno-exceptions -ffunction-sections -fdata-sections -fno -threadsafe-statics -w -x c ++ -E -DC -mmcu = ATmega328P -DF_CPU = 16000000L -DARDUINO = 10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ colors \ arduino "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ arduino \ hardware \ avr \ 1.6.11 \ variants \ standard "" -IC: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield-master "" -IC: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ Arduino \ hardware \ avr \ 1.6.11 \ libraries \ Wire \ src " "C:\Users\ADM\AppData\Local\Temp\build3c5ad1a17d445500f860adf0108a19ff.tmp\sketch\infrared_remote.ino.cpp" -O "C:\Users\ADM\AppData\Local\Temp\build3c5ad1a17d445500f860adf0108a19ff.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
C: \ Users \ ADM \ AppData \ Local \ Temp \ arduino_modified_sketch_68117 \ infrared_remote.ino: 26: 25: Fatal error: EV3Infrared.h: No such file or directory

 #include <EV3Infrared.h>

                         ^

compilation terminated.

Using the Wire library in version 1.0 in the folder: C: \ Users \ ADM \ AppData \ Local \ Arduino15 \ packages \ Arduino \ hardware \ avr \ 1.6.11 \ libraries \ Wire
Using EVShield-master library in the folder: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield-master (legacy)
exit status 1
Error compiling board for Arduino / Genuino Uno.
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_examples: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_examples
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_tests: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_tests
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ html: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ html
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_examples: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_examples
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_tests: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ EVShield_tests
Invalid library found in C: \ Users \ ADM \ Documents \ Arduino \ libraries \ html: C: \ Users \ ADM \ Documents \ Arduino \ libraries \ html
Please help me, I do not know how to solve.

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.