Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aerobs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Gattringer
aerobs
Commits
834cf1cb
Commit
834cf1cb
authored
10 months ago
by
Andreas Gattringer
Browse files
Options
Downloads
Patches
Plain Diff
updated umnp-rhtp.py
parent
7376b361
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/umnp-rhtp.py
+3
-4
3 additions, 4 deletions
programs/umnp-rhtp.py
with
3 additions
and
4 deletions
programs/umnp-rhtp.py
+
3
−
4
View file @
834cf1cb
...
...
@@ -25,8 +25,8 @@ SPI_MISO = machine.Pin(16)
SPI_SCK
=
machine
.
Pin
(
18
)
# serial clock
# I2C PARAMETERS
I2C_SCL
=
machine
.
Pin
(
4
)
# serial clock
I2C_SDA
=
machine
.
Pin
(
5
)
# serial data
I2C_SCL
=
machine
.
Pin
(
5
)
# serial clock
I2C_SDA
=
machine
.
Pin
(
4
)
# serial data
# ETHERNET PARAMETERS
ETH_CS
=
machine
.
Pin
(
17
)
# chip select
...
...
@@ -63,13 +63,12 @@ async def main():
# configure network
device
=
MeasurementDevice
(
device_type
=
DEVICE_TYPE_RHTP
)
spi
=
device
.
add_spi
(
0
,
SPI_BAUD
,
mosi
=
SPI_MOSI
,
miso
=
SPI_MISO
,
sck
=
SPI_SCK
)
i2c
=
device
.
add_i2c
(
i2c_id
=
1
,
scl
=
I2C_SCL
,
sda
=
I2C_SDA
,
timeout
=
10000
)
i2c
=
device
.
add_i2c
(
i2c_id
=
0
,
scl
=
I2C_SCL
,
sda
=
I2C_SDA
,
timeout
=
10000
)
dev_mac
=
device
.
generated_mac_raw
()
ether
=
EthernetW5500
(
spi
,
ETH_CS
,
ETH_RST
,
dev_mac
,
ETH_USE_DHCP
)
ether
.
set_network
(
ETH_IP
,
ETH_SUBNET
,
ETH_GATEWAY
,
ETH_DNS
)
device
.
add_network_adapter
(
ether
)
device
.
add_i2c
(
i2c
)
comm
=
device
.
create_communicator
()
sht45
=
SHT45
(
i2c
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment