How to expand IO capability of Arduino in LattePanda

A place to talk about all the Operating Systems, Software & Hardware
Forum rules

- Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

- Members should post in a way which is consistent with "normal writing". That is users should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT or use excessive punctuation (e.g. ! and ?) in topic titles or posts.

- Members should use an appropriate, descriptive subject when posting a new topic. Examples of bad subjects include; "Help me!", "I'm stuck!", "I've got an error!", etc. Examples of good subjects include; "Getting an TABLE FULL error upon login", "Cannot restore a backup".

- Members are asked to post in English only so that posts can be well received and properly monitored.

- Spam is not tolerated here under any circumstance. This includes offering hosting services (charged and free), installation services, solicitation etc. Recruiting members for your own projects (moderators, designers, professional MOD work, etc.) is not permitted and is also considered spam. Users posting spam will be warned and their post removed.

- Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning. Vulgar language and inappropriate material is not allowed and will be removed. We try to maintain a family friendly atmosphere whenever it is possible within the main subject matter of this community. Please keep this in mind when participating.

- Each user is allowed to create one account. If you would like to change your username, please contact us and, most likely, we can do it for you while you can keep all of your profile data, posts, and other content.

- If a user violates our guidelines and shows a disregard for them, our staff and our community, they run the risk of losing their account. We reserve the right to deactivate any account and to edit or remove any content without warning. These guidelines are subject to change at any time without notice.

Thank you for visiting LattePanda.com!
User avatar
resonanceshah
Posts: 7
Joined: Mon Jan 02, 2017 9:33 am

Mon Jan 02, 2017 9:42 am

Hi,

I would like to expand the IO capability of the Arduino using SPI (preferably) or I2C communication and further access the variable holding the IO status in VB.Net ... Can anyone pls guide if this is possible to do. I am not sure if Lattepanda has SPI capability. Moreover all info I get online are how to access the digital & analog IO pins. Can variables be accessed in any way.

Thanks

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Mon Jan 02, 2017 10:45 am


User avatar
resonanceshah
Posts: 7
Joined: Mon Jan 02, 2017 9:33 am

Mon Jan 02, 2017 11:00 am

Hi Lodin,

Thanks for the reply, but like I mentioned most documentation only mentions how to access digital I/O. What I need to do is expand the I/O range by having IO chips connected to arduino using SPI or I2C. Further their status shall be stored in a variable. This variable is to be further read into VB.Net. I am not sure if this is possible. Also, is SPI possible on the LattePanda Arduino.

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Mon Jan 02, 2017 11:41 am

Hi resonanceshah,
(Google translator)
OK, something more in detail:
You need a software on the Arduino Leonardo to read and write the data via the SPI and to communicate with the PC to transfer the data via USB. Examples should be found on the Arduino page.

Then you need on the PC a second software for communication with the Leonardo, which collects the data via the USB. Because there is no direct connection between the ARDUINO pins and the PC on the LP board.

There is a connector (U1 http://www.lattepanda.com/docs/#Hardwar ... ccessories) with a serial interface and three I2C interfaces connected directly to the CPU. But their signals have 1.8V level, so you need level shifter IC and the occupancy in the picture is WRONG! The serial interface is the COM1 in Windows and I have already used.
But there is NO information on how to address the I2C although we have been waiting for a long time! :cry: :twisted:

User avatar
resonanceshah
Posts: 7
Joined: Mon Jan 02, 2017 9:33 am

Mon Jan 02, 2017 3:40 pm

Dear Lodin

Are you sure there wud be no way to access arduino directly without having to go via USB as there are VB codes available to access digital and analog I/O pins directly. It seems like there would be some direct wiring between the pc and arduino else how cud they access these pins via VB.

Also leonardo by itself does support SPI... so shouldn't it be possible from lattepanda too?

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Mon Jan 02, 2017 4:13 pm

resonanceshah wrote:
(...)
as there are VB codes available to access digital and analog I/O pins directly.
(...)
Can you show some examples or links to them ?

User avatar
resonanceshah
Posts: 7
Joined: Mon Jan 02, 2017 9:33 am

Tue Jan 03, 2017 5:36 am

The link sent by you itself has it.

http://www.lattepanda.com/docs/#How_to_ ... ual_Studio

Wouldn't this give us access to the digital and analog I/O of the arduino?

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Tue Jan 03, 2017 12:52 pm

resonanceshah wrote:The link sent by you itself has it.

http://www.lattepanda.com/docs/#How_to_ ... ual_Studio

Wouldn't this give us access to the digital and analog I/O of the arduino?
Not directly.

Did you google for "Firmata" to look what it is?

What do you think what http://www.lattepanda.com/docs/#SetuptheArduino "3.Select your COM port" means?

... and you have to use in your PC software a Constructor
"public Arduino (string serialPortName, Int32 baudRate, bool autoStart, int delay);"
( that is C#, but VB should look very similar)

A deeper look in the device manager then shows the COM3 as a virtual port, which comes from the USB.

I'm still waiting for the wiki promised by LattaPanda :twisted: ,
then I make a schematic drawing.

Conclusion (for me):
The https://www.arduino.cc/en/Main/ArduinoBoardLeonardo has a USB interface for communication.
This is connected to the USB of the LP.
A driver makes this USB visible as a virtual serial port (COM3, unfortunately sometimes also COM5 or another!) In Windows.
The PC software can also appeal to this interface like any other serial.
It requires software on the Leonardo as well as on the PC for the communication protocol via the interfaces.
This software is ready for the Leonardo.
For the PC as a software source.

User avatar
resonanceshah
Posts: 7
Joined: Mon Jan 02, 2017 9:33 am

Thu Jan 05, 2017 6:48 am

ok that makes sense ... Thanks for your revert. I presume even the RX/TX cannot be accessed by VB directly right to communicate with some device serially? So for ppl like us who need access to more I/O (around 60) probably going for some other solution may be better?

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Thu Jan 05, 2017 8:34 am

resonanceshah wrote:ok that makes sense ... Thanks for your revert. I presume even the RX/TX cannot be accessed by VB directly right to communicate with some device serially? So for ppl like us who need access to more I/O (around 60) probably going for some other solution may be better?
Hello resonanceshah,

I assume, if you want to use the TX / RX interface, you plan to use your own circuit board?
Then why not using the COM1 from the LP, without the onboard Arduino?
You may need a level shifter IC like the MAX3373, because the signal at U1 (LINK) only have 1.8V level.

Here is a photo with a section of my circuit board:
COM1_PCB__004.jpg
COM1_PCB__004.jpg (238.53 KiB) Viewed 7380 times
One can clearly see at the wires, the occupancy in the documentation is unfortunately not correct !

Screenshot from LP, using terminal program "Docklight" to test the connection.
Screen_COM1_001t.JPG
Screen_COM1_001t.JPG (165.04 KiB) Viewed 7380 times
@LATTEPANDA : Documentation of U1 is still incorrect and we are also waiting for examples using the I2C on U1 !

Post Reply