Skip to content

peppemas/Lua_for_LinkIt_One

This branch is 1 commit ahead of, 2 commits behind Seeed-Studio/Lua_for_LinkIt_One:dev.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
cougaro
Nov 18, 2015
b8b6334 · Nov 18, 2015

History

10 Commits
Sep 10, 2015
Sep 18, 2015
Sep 10, 2015
Oct 6, 2015
Oct 6, 2015
Nov 18, 2015
Oct 6, 2015
Sep 18, 2015
Sep 10, 2015
Oct 6, 2015
Sep 18, 2015
Oct 6, 2015
Sep 10, 2015
Oct 6, 2015
Sep 18, 2015
Sep 18, 2015
Sep 10, 2015
Sep 18, 2015
Sep 21, 2015
Oct 6, 2015
Oct 6, 2015
Oct 6, 2015
Oct 6, 2015
Oct 6, 2015

Repository files navigation

Lua_for_LinkIt_One

Requirements

  • gcc-arm-embedded
  • make
  • PackTag & PushTool from LinkIt One SDK (available for Windows/Mac)

Add gcc-arm-embedded path to PATH variable, create tools direcotry and put PackTag & PushTool into it.

Download

make flash PORT={linkit one debug port}

Get started with Lua

Use serial port tool like miniterm.py to open linkit one modem port and enter:

print('hello, lua')

API

  • audio

    • audio.play('music.mp3')
    • audio.pause()
    • audio.resume()
    • audio.stop()
    • audio.set_volome(n), n from 1 to 6
    • audio.get_volome()
  • gsm

    • gsm.call(phone_number)
    • gsm.hang()
    • gsm.accept()
    • gsm.on_incoming_call(function (phone_number) print('incoming call') end)
    • gsm.text(phone_number, message)
    • gsm.on_new_message(function (phone_number, message) print('got a message') end)
  • timer

    • id = timer.create(interval, repeat_function)
    • timer.delete(id)
  • gpio

    • gpio.mode(pin, mode) - mode: gpio.INPUT, gpio.OUTPUT, gpio.INPUT_PULLUP
    • gpio.read(pin)
    • gpio.write(pin, value)

Releases

No releases published

Packages

No packages published

Languages

  • C 93.3%
  • C++ 4.6%
  • Objective-C 2.0%
  • Makefile 0.1%