EVShield compatible with Arduino/Genuino Zero?
 Arduino   Started by Boumaa   2017-05-01 08:01:59 -04:00   Comments: 10    Viewed: 261

  1. Boumaa
    Boumaa Member
    Hi,

    I saw on this webpage that the EVShield is compatible with :" EVShield attaches directly to an Arduino Duemilanove or Uno or Genuino 101", but I am wondering if it is also compatible with the Arduino/Genuino Zero? Any reason I should not use both togheter?

    Thanks,

    Martin
    Boumaa, 2017-05-01 08:01:59 -04:00
  2. seth10
    seth10 Member Staff Member
    Good morning!

    From what we can tell the Arduino/Genuino Zero should be compatible. It aligns with the standard Arduino 1.0 pinout. Keep in mind the EVShield supplies power to the Arduino, but it doesn't use any pins besides those and the I2C pins (Vin, 5V, 3.3V, SCL, SDA). Take a look at the Advanced User Guide.

    If you give it a go, please let us know!

    From,
    Seth Tenembaum
    mindsensors.com
    seth10, 2017-05-01 10:05:04 -04:00
  3. Boumaa
    Boumaa Member
    Thanks for the confirmation!  That is what we tought as the issue we have with using the Mega is the I2C pins not been located on the same pins as the UNO. 

    I will let you know if we try the Zero.


    Martin
    Boumaa, 2017-05-01 10:58:34 -04:00
  4. Boumaa
    Boumaa Member
    Hi,

    Before buying the Zero, I instaled the Arduino Zero drivers, selected the Zero board and tried to compile a simple code (EVShield-master/blinkers) and got many warning like this one:

    ...ArduinolibrariesEVShield-masterEVShield.cpp: In function 'void pingEV()':

    ...ArduinolibrariesEVShield-masterEVShield.cpp:766:9: error: 'TWCR' was not declared in this scope

    TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN);

    ^
    Are these something that will prevent the code to run on the Arduino Zero board?  

    Note that I did the same test selecting the "Genuino 101" board, and got warning too (and they were different!) . So, maybe I am seeing those warnings because I do not have the actual board connected (but I only clicked on the "verify" button)?

    Thanks,
    Martin
    Boumaa, 2017-05-01 12:21:50 -04:00
  5. seth10
    seth10 Member Staff Member
    Great test! I really like your idea of trying to compiling code before ordering a product that uses it.

    Also, fixed! Here is the branch. It compiles, but unfortunately I do not have an Arduino Zero to test it on. Please let me know if it works for you, and if not what went wrong so I can fix it.
    seth10, 2017-05-01 14:07:22 -04:00
  6. Boumaa
    Boumaa Member
    Wow..  it does compile without warning now (well only the "#warning from EVShield: Touchscreen methods are only supported on PiStorms"). 

    Thanks a lot,

    Martin

    I just found out this note from the Adruino site: "Warning: Unlike most Arduino & Genuino boards, the Zero runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Applying voltages higher than 3.3V to any I/O pin could damage the board."

    Can that be a problem? I found in the EVShield-Advanced-Development-Guide.pdf that the shield use:
    page 1:  "I2C Ports Specs: EVShield has 1 I2C Port with male pin headers. I2C Voltage: 5 Volts"

    Should I use an "Adruino 101" instead which has a different note: "The board operating voltage and I/O is 3.3V but all pins are protected against 5V overvoltage." ?  But the Ardunio IDE still gives me lots of error while compiling using the 101 board. 


    Boumaa, 2017-05-01 14:36:48 -04:00
  7. seth10
    seth10 Member Staff Member
    It should work. Unfortunately, we do not have one to verify this with, so we can't guarantee it. You might be better off buying a normal Arduino Uno if that suits your needs.
    seth10, 2017-05-01 15:46:39 -04:00
  8. Boumaa
    Boumaa Member
    We are already using an Arduino UNO, the goal to use the Zero to not be limited with memory (there are lots of libaraies loaded :( ). Plus I had found a local place that have it in stock. Unfortunately, it is a little too expensive to just buy and test.  Would the 101 be a safer buy (they will receive one today), but it also have many warnings when I compile with it. The goal would be to swap the UNO and have a minimum work to do on the sketch.
    Boumaa, 2017-05-02 07:01:31 -04:00
  9. seth10
    seth10 Member Staff Member
    So you are looking for additional SRAM, or Flash? Here is a table to help future visitors to this thread (Hi!). If you have the prices from your local place we can fill that in instead (it wasn't the easiest to find reliable online prices for each board).

     Arduino UnoArduino 101Arduino Zero
    Price$5.00$30.00$45.00
    Flash memory32 KB196 kB256 KB
    SRAM2 KB24 kB32 KB
    EEPROM1 KB--
    Operating voltage5V3.3V (5V tolerant I/O)3.3V
    Digital I/O pins141420
    PWM pins6418
    Analog input pins666, 12-bit ADC channels
    Analog output pins--1, 10-bit DAC
    Other featuresClassic, the de facto standardBluetooth LE, 6-axis accelerometer/gyro32-bit ARM Cortex® M0+ core, Atmel’s Embedded Debugger

    I am looking in to the warnings now.
    seth10, 2017-05-02 10:06:03 -04:00
  10. seth10
    seth10 Member Staff Member
    Those warnings are nothing to worry about. I believe I fixed them before but those changes were never merged as they were "unecessary." In any case, here's a branch without those warnings, if that makes you more comfortable. It seems those warning flags (-Wreturn-type for "control reaches end of non-void function" and -Wunused-variable for "unused variable 'a'") are not used when compiling for the Arduino Uno. However, when you compile for the Arduino 101 they are used. If you are interested in learning more go to File → Preferences look for "Show vebose output during:" and check "compilation".
    seth10, 2017-05-02 10:55:06 -04:00
  11. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!
Help!