Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
a9256aec
Commit
a9256aec
authored
Jun 01, 2019
by
galjonsfigur
Committed by
Marcel Stör
Jun 01, 2019
Browse files
Fix issue #2753 and fix documentation example (#2776)
parent
5f43a414
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/modules/ads1115.c
View file @
a9256aec
...
@@ -585,7 +585,7 @@ LROT_BEGIN(ads1115_instance)
...
@@ -585,7 +585,7 @@ LROT_BEGIN(ads1115_instance)
#ifdef ADS1115_INCLUDE_TEST_FUNCTION
#ifdef ADS1115_INCLUDE_TEST_FUNCTION
LROT_FUNCENTRY
(
test_volt_conversion
,
test_volt_conversion
)
LROT_FUNCENTRY
(
test_volt_conversion
,
test_volt_conversion
)
#endif
#endif
LROT_TABENTRY
(
"
__index
"
,
ads1115_instance
)
LROT_TABENTRY
(
__index
,
ads1115_instance
)
LROT_FUNCENTRY
(
__gc
,
ads1115_lua_delete
)
LROT_FUNCENTRY
(
__gc
,
ads1115_lua_delete
)
LROT_END
(
ads1115_instance
,
ads1115_instance
,
LROT_MASK_GC_INDEX
)
LROT_END
(
ads1115_instance
,
ads1115_instance
,
LROT_MASK_GC_INDEX
)
...
...
docs/modules/ads1115.md
View file @
a9256aec
...
@@ -125,7 +125,7 @@ adc1:setting(ads1115.GAIN_6_144V, ads1115.DR_128SPS, ads1115.SINGLE_0, ads1115.C
...
@@ -125,7 +125,7 @@ adc1:setting(ads1115.GAIN_6_144V, ads1115.DR_128SPS, ads1115.SINGLE_0, ads1115.C
local
function
comparator
(
level
,
when
)
local
function
comparator
(
level
,
when
)
-- read adc result with read() when threshold reached
-- read adc result with read() when threshold reached
gpio
.
trig
(
alert_pin
)
gpio
.
trig
(
alert_pin
)
volt
,
volt_dec
,
adc
,
sign
=
ad
s
1
:
read
()
volt
,
volt_dec
,
adc
,
sign
=
ad
c
1
:
read
()
print
(
volt
,
volt_dec
,
adc
,
sign
)
print
(
volt
,
volt_dec
,
adc
,
sign
)
end
end
gpio
.
mode
(
alert_pin
,
gpio
.
INT
)
gpio
.
mode
(
alert_pin
,
gpio
.
INT
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment