Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
- Lua Tiny RAM (LTR) patch is now integrated in eLua and is enabled b…
…y default - all eLua modules updated to work with LTR - "cpu" module added to avr32, at91sam7x, str7 - "disp" module no longer generic (now stays in src/modules/lm3s). For this reason, the "disp" platform interface was also removed. - the "modcommon" mechanism in STM32 (ROM loader) was depreciated in favour of the Lua Tiny RAM patch (and the "stm3210lcd" module from the STM32 backend now uses LTR). - small bugfixes
- Loading branch information
Showing
79 changed files
with
1,471 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| -- Control LED intensity with PWM on two channels | ||
|
|
||
| local pwmid1, pwmid2, tmrid = 0, 1, 3 | ||
|
|
||
| if pd.board() ~= "MOD711" then | ||
| print "Unsopported board" | ||
| return | ||
| end | ||
|
|
||
| print "Control LED with PWM (fade up/down)" | ||
| print "Press any key to exit" | ||
| local crtduty, incr = 10, 5 | ||
| pwm.setup( pwmid1, 50000, crtduty ) | ||
| pwm.setup( pwmid2, 50000, 100 - crtduty ) | ||
| pwm.start( pwmid1 ) | ||
| pwm.start( pwmid2 ) | ||
| while uart.recv( 1, 0, 0 ) < 0 do | ||
| if crtduty == 95 or crtduty == 5 then | ||
| incr = -incr | ||
| end | ||
| crtduty = crtduty + incr | ||
| pwm.setup( pwmid1, 50000, crtduty ) | ||
| pwm.setup( pwmid2, 50000, 100 - crtduty ) | ||
| tmr.delay( tmrid, 50000 ) | ||
| end | ||
|
|
||
| pwm.stop( pwmid1 ) | ||
| pwm.stop( pwmid2 ) | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.