Difference between revisions of "MakaPython A9G"

From MakerFabsWiki
Jump to: navigation, search
(Usage)
(Features)
Line 15: Line 15:
 
*Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
 
*Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
 
*Support SMS text messaging
 
*Support SMS text messaging
*Support USB power charge
 
 
*Support Micro SD Card
 
*Support Micro SD Card
*Interface: I2C/SPI/UART
 
 
*Working Temperature: -40 – 85℃
 
*Working Temperature: -40 – 85℃
*Default baud rate: 115200
+
*Size: 70*32.6mm
*Size: 40*55mm
 
  
 
== Interface Function ==
 
== Interface Function ==

Revision as of 06:12, 21 May 2020

Introduction

MakePython A9G is an IOT for GPRS / GSM + GPS module, users can use MicroPython to program it, which is very easy, especially for non-programmers. There is also a user guide to learn how to use the board to create the first IOT project, which allows beginners to quickly learn hardware and programming skills.

With this board, you will easy to add text, SMS and data to your project. It is good for your smart home project or GPS tracker and so on.

Model: OAC010A9G

Error creating thumbnail: File with dimensions greater than 12.5 MP

Features

  • Micro SIM connector
  • Support AT Command
  • Quad-band: 850/900/1800/1900Mz
  • Support GPS
  • Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
  • Support SMS text messaging
  • Support Micro SD Card
  • Working Temperature: -40 – 85℃
  • Size: 70*32.6mm

Interface Function

MakePython A9G 2.JPG
①BAT: 3.7V Lipo battery connector
②CHRG: 5V power input
③Micro SD Card Holder
④Micro SIM Card Holder
⑤A9G Module
⑥GSM: GSM Antenna IPX Interface
⑦GPS: GPS Antenna IPX Interface

Usage

Warning: Don't operate when in power supply on (That is, don’t plug or unplug the Antenna ,SIM Cars, SD Card , in case of short-circuit that may burn the IC down.)

AT command

AT+GPS=1	#1:Turn the GPS on, 0:Turn the GPS off
AT+CCID		
AT+CREG?   
AT+CSQ		
AT+CGATT=1		
AT+CGDCONT=1,”IP”,”CMNET”	
AT+CGACT=1,1	
AT+GPSRD=N	
AT+GPSRD=0	
AT+LOCATION=2 

Load Demo

#  https://thingspeak.com/channels/920821
from machine import UART,Pin
import utime
import dht
import machine

apiKey="P310JKLFLCY7B09G"
'''
d = dht.DHT11(machine.Pin(26))
d.measure()
d.temperature() # eg. 23 (°C)
d.humidity()    # eg. 41 (% RH)
'''
uart = UART(2, baudrate=115200, rx=16, tx=22,timeout=10)

count = 1

A9G_RESET_PIN = Pin(33, Pin.OUT)
A9G_RESET_PIN.value(0)             #set pin to low

utime.sleep_ms(2000)
A9G_PWR_KEY = Pin(21, Pin.OUT) 
A9G_PWR_KEY.value(0)
utime.sleep_ms(2000)
A9G_PWR_KEY.value(1)
utime.sleep_ms(20000)

if True:
    uart.write('AT+GPS=0\r\n')#1: turn on GPS  0:Turn off GPS
    utime.sleep_ms(1000)
    uart.write('AT+CCID\r\n')
    utime.sleep_ms(1000)
    uart.write('AT+CREG?\r\n')
    utime.sleep_ms(1000)
    uart.write('AT+CGATT=1\r\n')
    utime.sleep_ms(1000)
    uart.write('AT+CGACT=1,1\r\n')
    utime.sleep_ms(1000)
    uart.write('AT+CGDCONT=1,\"IP\",\"CMNET\"\r\n')
    utime.sleep_ms(1000)
    uart.write('AT+CSQ\r\n')
    utime.sleep_ms(1000)
    #d.measure()
    temperature=23.5#d.temperature() # eg. 23 (°C)
    humidity=86.2#d.humidity()    # eg. 41 (% RH)
    print('\n\n===============CNT {}==============='.format(count))
    #cmdString= "AT+HTTPGET=\"http://api.thingspeak.com/update.json?api_key="+apiKey+"&field1="+(str)temperature+"&field2="+((str)humidity)+"&field3=0.0&field4=0.0"+"\""
    cmdString= "AT+HTTPGET=\"http://api.thingspeak.com/update.json?api_key="+apiKey+"&field1=35.5"+"&field2=86.2"+"&field3=0.0&field4=0.0"+"\""
    uart.write(cmdString+'\r\n')

    while True:      
      if uart.any():
        bin_data = uart.readline()
        #data_string=str((bin_data),'utf-8')
        #data_string=bin_data.encode("utf-8")
        print(bin_data)
        uart.write('AT\r\n')
      utime.sleep_ms(2000)

FAQ

You can list your questions here or contact with support@makerfabs.com for technology support.

Resources