<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Roberto,<br>
<br>
Yes, I would also like a native Gambas component for i2c and GPIO
(not used SPI)...<br>
<br>
Take a quick look at my code on the Gambas Farm "gb.PiconZero", I
wrote a very basic i2c (via shell) and GPIO class (via shell /
gpio sysfs).<br>
<br>
Also on github add Setup photos:<a moz-do-not-send="true"
href="https://github.com/Matthew-Collins/gb.PiconZero"><br>
https://github.com/Matthew-Collins/gb.PiconZero</a><br>
</p>
<p>If you don't already know, the Gambas Farm is a place where other
users share code and is available directly in the Startup dialog
(and Tools > Software Farm) in the Gambas IDE.<br>
<br>
If you plan to write a Gambas Component in C this might help:<br>
<a
href="https://github.com/ev3dev/i2c-tools/blob/ev3dev-stretch/tools/i2cget.c">https://github.com/ev3dev/i2c-tools/blob/ev3dev-stretch/tools/i2cget.c</a></p>
<p>Thanks<br>
Matt<br>
<br>
On 5/13/19 5:55 PM, roberto wrote:<br>
</p>
<blockquote type="cite"
cite="mid:72e7fa16-7d2b-e0a5-30d5-52a9f21b2c3b@tiscali.it">Hello,
<br>
<br>
I am just registered to ML, I use gambas 3.9.1 on GNU/Linux.
<br>
I write here to show my needs.
<br>
<br>
I use GAMBAS on embedded ARM board (i.e. Raspberry, Nano Pi Fire
2A and 3, and so on).
<br>
Those boards (but in general all ARM embedded boards) offer I/O
and dedicated serial lines as UART, SPI and I2C. Gambas has class
SerialPort that was great in "desktop" Era, an is still great also
in embedded field.
<br>
Unfortunately, many (almost all) devices are controlled by SPI and
I2C interfaces (Analog-to-Digital/Digital-to-Analog converter, I/O
expander, EEPROM, ecc) and those chip are essential in embedded
project.
<br>
Actually, I use GAMBAS to develop GUI where i use class SeriaPort
to control a microcontroller and the microcontroller controls the
SPI/I2C chip I am interested in. In other words, I must add tho
the project a uC and program it as "interpreter" between GAMBAS
and the SPI/I2C devices.
<br>
It will be very nice to have 2 new classes to control the SPI and
I2C bus and skip the necessity of a "translator": it will be save
space on PCB and speed up develop of projects.
<br>
More, it will add new and good value to gambas itself, because it
will easely can became *THE* IDE for embedded platforms for all
the linuxers, like me, that like to code embedded boards but
prefere gambas over Python, C, C++, ecc.
<br>
For both protocol SPI and I2C, in my opinion is not requested
immediatly a full support (to play both as master or slave) but it
can be enough that the 2 classes SPI and I2C can play as Master,
more sophisticated mode can came later.
<br>
<br>
<br>
Thanks,
<br>
<br>
Roberto
<br>
<br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a>
]----
<br>
</blockquote>
</body>
</html>