35 lines
884 B
Markdown
35 lines
884 B
Markdown
![]() |
---
|
||
|
tag: api
|
||
|
type: function
|
||
|
type: function
|
||
|
name: publish_P
|
||
|
params:
|
||
|
- name: topic
|
||
|
description: the topic to publish to
|
||
|
type: const char[]
|
||
|
- name: payload
|
||
|
description: the message to publish
|
||
|
type: const char[], byte[]
|
||
|
- name: length
|
||
|
optional: true
|
||
|
description: the length of the payload. Required if <span class="methodparams">payload</span> is a <span class="methodparamstype">byte[]</span>
|
||
|
type: unsigned int
|
||
|
- name: retained
|
||
|
optional: true
|
||
|
description: whether the message should be retained
|
||
|
<ul>
|
||
|
<li>false - not retained</li>
|
||
|
<li>true - retained</li>
|
||
|
</ul>
|
||
|
type: boolean
|
||
|
returns:
|
||
|
type: boolean
|
||
|
values:
|
||
|
- value: 'false'
|
||
|
description: publish failed, either connection lost or message too large
|
||
|
- value: 'true'
|
||
|
description: publish succeeded
|
||
|
---
|
||
|
|
||
|
Publishes a message stored in PROGMEM to the specified topic.
|