How to control - command line

Support for the The Peripherals I2C Control – PiCO – Interface

How to control - command line

Postby rbuelund » Thu Aug 21, 2014 7:55 pm

Hi

I'm using my RS232 interface for communication with a GSM module and therefore cannot use it to communicate with the upis. How can i read/write values through the i2c interface using the command line ?? Please state an example.
rbuelund
 
Posts: 65
Joined: Thu Aug 14, 2014 8:32 pm

Re: How to control - command line

Postby Pimaster » Thu Aug 21, 2014 9:35 pm

Hi,

1.Use the latest firmware release, due to fact that in this version most of the PICo commands are implemented
2. For you reference, use below list of PICo variables and their description

Here it is the 1.096 version
https://app.box.com/s/53lt1ox02w95gfw5ttr5

as also resisters update

https://app.box.com/s/23y7vwywllc10ga3pb14

3. You need to have installed the i2ctools before you use them from command line, please install it

Example of using it

Read seconds of the RTC in BCD format
$sudo i2cget –y 1 0x69 0

$sudo i2cget -y 1 0x6a 1 w
0x0411
Means 411 of 10th of mV, so it is 411*10 mV = 4110 mV = 4.11 V



Please play little bit with reading variables and then start writing to them to avoid possible problem

Hope it help,
Warmest Regards
Pi Master
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1581
Joined: Fri Sep 14, 2012 7:50 am

Re: How to control - command line

Postby gugu » Tue Sep 30, 2014 10:40 am

How do i set the Startup time from a bash script with i2cget.
gugu
 
Posts: 1
Joined: Tue Sep 30, 2014 10:38 am


Return to The Peripherals I2C Control Interface – PiCO

Who is online

Users browsing this forum: No registered users and 1 guest