Home
RECOMMENDED FOR YOU:
SMS Gateway software
Ozeki brings you outstanding
SMS Gateway technology. Use our SMS Server products on Windows,Linux, or Android

C# SMS API
Developers can use our C# SMS API to send SMS from C#.Net. The C# SMS API comes with full source code

PHP SMS API
The ozeki PHP SMS gateway software can be used to send SMS from PHP and to receive SMS usig PHP on your website

SMPP SMS Gateway
SMS service providers use our SMPP gateway solution, that offers a high performance SMPP server and SMPP client gateway with amazing routing capabilities
Ozeki 10

Raspberry PI Keyboard Control Code

MPR121 capacitive touch keypad controller is capable to sense 12 buttons. When you touch a button, the character is sent to this OZEKI software. The 12 characters are numbers (0-9) plus * and #. You can connect the MPR121 to your Raspberry Pi.

rpi with capacitive keyboard
Figure 1 - Raspberry PI with MPR121 capacitive keyboard

Required hardware

  • Raspberry PI
  • MPR121 capacitive keyboard

Source code to install on controller


import sys
import time

import Adafruit_MPR121.MPR121 as MPR121

cap = MPR121.MPR121()

if not cap.begin():
    sys.exit(1)

keypads = {3:1, 7:2, 11:3, 2:4, 6:5, 10:6, 1:7, 5:8, 9:9, 0:'*', 4:0, 8:'#'}
def main():
    last_touched = cap.touched()
    while True:
        current_touched = cap.touched()
        for i in range(12):
            pin_bit = 1 << i
            if current_touched & pin_bit and not last_touched & pin_bit:
                for real, wanted in keypads.iteritems():
		    if real == i:
			print wanted
        last_touched = current_touched
        time.sleep(0.1)

if __name__=="__main__":
    main()

More information