As we saw some time ago, new Java classes have been included in the new SDK versions from the TC65 module’s new firmware release (current version 3.0), XT65 (current version 2.0) and TC65i (current version 1.0).

Months ago we saw the new Watchdog class. Today I am going to post a small example of how to use the new InPort and OutPort classes which enable us to easily manage the digital inputs and output pins in our Siemens/Cinterion modems.

Programación java Siemens


GPIO_API_EXAMPLE 
(Download)

Description: I have based the example on the MTX65v3. As you know this terminal has 4 digital inputs/outputs which are GPIO1, GPIO2, GPIO3 and GPIO4.

In the example I configured GPIO1 and GPIO2 and inputs and GPIO3 and GPIO4 and outputs. I presume that they are directly joined together through cable connections (GPIO1 with GPIO3 pins and GPIO2 with GPIO4). In the example the output statuses are varied (GPIO3 and GPIO4) and the input values (GPIO1 and GPIO2) are shown through the standard output (System.out.println). In the Java example you can see that the code is discussed line by line so I won’t dwell on it much here. If you use the MTX65v3 and run the application, this should be the result:

Valid for modems: TC65 (v3.0), TC65i, XT65 (v2.0) y MTX65v3

I hope you find it useful. See you next time.

P.S. Good luck for tomorrow (the 22nd) for the Christmas Lottery, let’s see if we are lucky enough to win!


Post relacionados:

  1. Using GPIO Polling in Cinterion GPRS Modems If you’ve ever worked with GPIOs from Cinterion TC65 or XT65 (or their MTX terminals), you...
  2. Adding Data to Files from Java with Siemens-Cinterion Modems On several occasions I have been asked how to add...
  3. Java FTP example for Cinterion GPRS modems TC65 and XT65 You will possibly at some point have to make a...
  4. How to get the time with MTX terminals and Siemens/Cinterion modems I haven’t written on blogElectronica for nearly a month. For...
  5. Java Email Example for Siemens/Cinterion Modems This morning I spent a while testing sending emails through...








Tags: , , , , ,
Leave a Reply

Puedes publicar un comentario aquí si quieres, pero te recomiendo que uses el nuevo foroElectronica.com para introducir comentarios. Te contestaré más rápido. Recuerda que debes registrarte si no lo estás para publicar un comentario.