• Stars
    star
    123
  • Rank 288,622 (Top 6 %)
  • Language
    C
  • Created about 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WiFiCMU-v0.9.8-pre release

WiFiMCU

Latest Firmware Download Download

WiFiMCU is developed based on EMW3165 module produced by MXCHIP.INC. A Lua interpreter is builded inside with hardware support. A light weight file system and socket protocols can help to realize IoT development easily and quickly. Basically, you can load Lua scripts on your device and then run it on board with nothing more than a terminal connection.
Enjoy Programming!

  ;   .  . .___ .  . __ .  .      ,--.
 ["]  |  |o[__ o|\/|/  `|  | ,<-|__oo|
/[_]\ |/\|||   ||  |\__.|__| /  |//  |
 ] [                            /o|__|  [www.wifimcu.com@2015]

#Overview

  • Based on Lua 5.1.4 (package, string, table, math modules)
  • Build-in modules: mcu,gpio, timer, wifi, net, file, pwm, uart, adc, spi, i2c, bit
  • Modules to be builded: 1-wire, bit, mqtt...
  • Integer version provided
  • Free memory >48k bytes

##Highlights #####Cortex-M4 microcotroller

  • STM32F411CE
  • 100MHz,Cortex-M4 core
  • 2M bytes of SPI flash and 512K bytes of on-chip flash
  • 128K bytes of RAM
  • Operation Temperature:-30℃ ~ +85℃

#####Multi-Interface

  • 18 GPIO Pins
  • 2 UARTs
  • ADC(5)/SPI(1)/I2C(1)/USB(1)
  • SWD debug interface
  • 11 PWMs

#####Broadcom IEEE 802.11 b/g/n RF Chip

  • Supports 802.11 b/g/n
  • WEP,WPA/WPA2,PSK/Enterprise
  • 16.5dBm@11b,14.5dBm@11g,13.5dBm@11n
  • Receiver sensitivity:-87 dBm
  • Station,Soft AP and Station+Soft AP
  • CE, FCC suitable

#GPIO table

GPIO indexAlternative FunctionDiscription
D0GPIO/BOOTWiFiMCU would enter into Bootloader Mode, if D0 goes to LOW
D1GPIO/PWM/ADC
D2GPIO
D3GPIO/PWM
D4GPIO
D5GPIOSWD Flash Programming Pin: swclk
D6GPIOSWD Flash Programming Pin: swdio
D7GPIO
D8GPIO/PWMUart1 rx pin: RX1
D9GPIO/PWMUart1 tx pin: TX1
D10GPIO/PWMI2C interface: SCL
D11GPIO/PWMI2C interface: SDA
D12GPIO/PWM
D13GPIO/PWM/ADC
D14GPIO/PWM
D15GPIO/PWM/ADC
D16GPIO/PWM/ADC
D17GPIO/ADCA LED is connected on WiFiMCU board

Tutorial

###How to Use

###Reference WiFiMCU Function Refecence
WiFiMCU Tutorial
EMW3165 Datasheet(English)
EMW3165 Datasheet(Chinese)
WiFiMCU SCH
EMW3165 Datasheet(English)
EMW3165 Datasheet(Chinese)
WiFiMCU SCH

###Resource Home site:www.wifimcu.com
discussion:www.emw3165.com
http://bbs.smartarduino.com
http://bbs.doit.am

###The IDE tool for wifimcu can be found here
WiFiMCU STUDIO(supported by WiFiMCU Team)
WMC WiFiMCU CLI Article(Thanks for Zpeters' contribution)

#Program demos ####Setup a AP

    cfg={ssid='Doit_3165',pwd=''}
    wifi.startap(cfg)

####WebServer

   skt = net.new(net.TCP,net.SERVER) 
   net.on(skt,"accept",function(clt,ip,port) 
   print("accept ip:"..ip.." port:"..port.." clt:"..clt) 
   net.send(clt,[[HTTP/1.1 200 OK
   Server: WiFiMCU
   Content-Type:text/html
   Content-Length: 28
   Connection: close
   
   
   <h1>Welcome to WiFiMCU!</h1>]])
   end)
   net.start(skt,80) 

####Connect Wireless Router

   print(wifi.sta.getip())  --check ip
   0.0.0.0
   cfg={ssid="Doit",pwd="123456789"} wifi.startsta(cfg) --sta mode connect
   print(wifi.sta.getip())  --check ip
   0.0.0.0
   print(wifi.sta.getip())  --check ip
   192.168.1.116 

####Connect Remote Server

   clt = net.new(net.TCP,net.CLIENT)
   net.on(clt,"dnsfound",function(clt,ip) print("dnsfound clt:"..clt.." ip:"..ip) end)
   net.on(clt,"connect",function(clt) print("connect:clt:"..clt) end)
   net.on(clt,"disconnect",function(clt) print("disconnect:clt:"..clt) end)
   net.on(clt,"receive",function(clt,data) print("receive:clt:"..clt.."data:"..data) end)
   net.start(clt,6579,"115.29.109.104")

####GPIO Operation

   gpio.mode(17,gpio.OUTPUT)
   gpio.toggle(17)
   gpio.write(17,gpio.HIGH)
   gpio.write(17,gpio.LOW)
   gpio.mode(17,gpio.INPUT)
   =gpio.read(17)
   1
   =gpio.read(17)
   0

####Timer

   function tmr_cb() print('tmr1 is called') end 
   tmr.start(1,1000,tmr_cb)
   tmr1 is called
   tmr1 is called

####File Operation

   file.open ("test.lua","w+")
   file.write("this is a test")
   file.close()
   file.open ("test.lua","r")
   data=file.read()
   print(data)
   this is a test
   file.close()

####Auto start

   file.open ("init.lua","w+")
   file.write("print('Hello WiFiMCU!')")
   file.close()
   mcu.reboot()

####Acknowledgements Thanks to eLua project,NodeMCU project,spiffs file system

####Doctors of Intelligence & Technology
DoIT website
WiFiMCU Dev Kit

####Version log

v0.9.8.1 @2016-02-22
  • MQTT module:
    • Fix mqtt publish bug
v0.9.8 @2015-12-16
  • Add string.md5calc/md5 for md5 calculation
v0.9.7 @2015-12-14
  • (under beta version)
  • Mico SDK Lib:
    • Update to SDK 2.4.0
  • WiFi module:
    • Add easylink and airkiss function in wifi module
    • Add sethostname/sethostname function
  • GPIO module:
    • Enhance GPIO interrupt code to avoid errors in its callback function
  • Timer module:
    • Enhance Timer interrupt checking method
  • Uart module:
    • Use pushlstring for uart recieve data to avoid data missing
  • Net module:
    • Improve TCP Client connect callback function
  • MQTT module:
  • Others:
    • Rearrangement the source code files and folders
    • Improve wifimcu upload function, LUA_MAXINPUT 128->512
    • Support utf-8 charset
    • Optimize WiFiMCU STUDIO upload file function
    • Set init.lua or init.lc to start up
    • Fix dofile bug in tmr/gpio
    • Fix bootloader gpio initize bug,add compiling bootloader switch for MicoKit
      More details see change.log

More Repositories

1

SZDOITWiKi

366
star
2

ESPDuino

ESPDuino-ESP8266 Develop boards, arduino compatible shields from www.doit.am
Arduino
97
star
3

DoHome

Python
97
star
4

Doit_Cloud

Java
67
star
5

Doiting_BL

BL602 SDK
SWIG
64
star
6

DOITWiKi

C++
61
star
7

ESPboard

33
star
8

DoitCar

AP and STA source code
Lua
31
star
9

WiFiMCU-STUDIO

Open source develop tool for WiFiMCU
C#
16
star
10

IoT-System-on-OpenSource

SmartArduino is specializing in the open source hardware, like Arduino compatible boards, Raspberry pi, Beaglebone, Robotics, and Aircraft.
C++
15
star
11

zhdocs

JavaScript
15
star
12

COULD-coding-with-NodeMCU

COULD-coding-with-NodeMCU
Lua
12
star
13

ESPwifi

12
star
14

StingerOS

一个传感节点操作系统
C++
9
star
15

XPT

8
star
16

Android-Source-Code-DoitCar

Android-Source-Code-DoitCar
8
star
17

WIFI_5.8G

C
4
star
18

DoitArm

Doit arm based on ESPDuino
C++
4
star
19

beaconSpam_esp8266_WiFi-SSID_WiFi_Hotspots

Our WiFi hotspots advertisement machine can hold 32 wifi hotspots at a time, free DIY for things you want to promote. Comes with free OTG conversion head, you can edit the advertisement through the OTG head anywhere and anytime. Powered by USB, you can power it by power bank, laptop, socket and any device that can afford charging. No electricity inside, work with power bank plug in. Mini size like a U disk but big function, easy to store and carry around. No APP required. Just plug this to your phone and edit on the page freely, no APP required, easy and convenient to use. https://www.amazon.com/Hotspots-Advertisement-Billboard-Marketing-Promotion/dp/B09292P3T1
3
star
20

LB_L8_ESP32_HK

L8 homekit version
C
2
star
21

WIFI_5.8G_2

Realtek 5.8透传模组使用说明
2
star
22

Arduino-Third-party-Libraries

Store the Arduino library functions
2
star
23

viviRobot

2
star
24

HomeKit

2
star
25

DOITdoc

Makefile
2
star
26

Robotics

Some demos about Tank/Car chassis and accessories, such as motor, sensors, chassis, and others, which can be found at http://www.smartarduino.com/
Arduino
2
star
27

giteezh

HTML
1
star
28

gitnova.github.io

documents: http://sposmart.com/#/README
1
star
29

CAR

app
1
star
30

Arduino-Code

Upload an Arduino source
1
star