Update Readme & directory structure.
This commit is contained in:
parent
2342f2d0d3
commit
9b34cc7874
19 changed files with 87 additions and 28 deletions
|
@ -78,7 +78,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NucuCar.Domain.Telemetry\NucuCar.Domain.Telemetry.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Domain\NucuCar.Domain.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Telemetry\NucuCar.Telemetry.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NucuCar.Domain.Telemetry\NucuCar.Domain.Telemetry.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Domain\NucuCar.Domain.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Telemetry\NucuCar.Telemetry.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NucuCar.Domain.Telemetry\NucuCar.Domain.Telemetry.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Domain\NucuCar.Domain.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Sensors\NucuCar.Sensors.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Telemetry\NucuCar.Telemetry.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -8,7 +8,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NucuCar.Domain", "NucuCar.D
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NucuCar.UnitTests", "NucuCar.UnitTests\NucuCar.UnitTests.csproj", "{C6F07921-1052-4945-911E-F328A622F229}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NucuCar.Domain.Telemetry", "NucuCar.Domain.Telemetry\NucuCar.Domain.Telemetry.csproj", "{C20407F3-AB62-4590-B4FF-A0DCFCFA232B}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NucuCar.Telemetry", "NucuCar.Telemetry\NucuCar.Telemetry.csproj", "{C20407F3-AB62-4590-B4FF-A0DCFCFA232B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
105
Readme.md
105
Readme.md
|
@ -1,49 +1,70 @@
|
|||
# WIP
|
||||
# Introduction (WIP)
|
||||
|
||||
## Solution Information
|
||||
An attempt to create a remote weather station hub on the Raspberry Pi.
|
||||
|
||||
An attempt to create a remote controlled toy car.
|
||||
Powered by Raspberry Pi and .Net Core 3.1.
|
||||
The repository consists on several modules written in C# and an Android application written in Java.
|
||||
|
||||
https://docs.microsoft.com/en-us/dotnet/core/install/
|
||||
Communication between the Raspberry and the Android application is done via [gRPC](https://grpc.io/).
|
||||
|
||||
**The project is still undergoing development and it's not production ready.**
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/dnutiu/NucuCar.svg?style=svg)](https://circleci.com/gh/dnutiu/NucuCar)
|
||||
|
||||
### NucuCar.Domain
|
||||
# Architecture
|
||||
|
||||
Holds common classes and interfaces that are required by the projects.
|
||||
TBD
|
||||
|
||||
It provides all the types that are generated via protocol buffers.
|
||||
# Installing and Developing
|
||||
|
||||
### NucuCar.Common
|
||||
## Requirements
|
||||
|
||||
Contains implementations for common logic, contains wrappers.
|
||||
Usually utility classes and methods that are not necessarily tied to this solution
|
||||
and can be reused.
|
||||
To build this project you will need to install .Net Core 3.1 and Android Studio.
|
||||
|
||||
### NucuCar.Telemetry
|
||||
* https://docs.microsoft.com/en-us/dotnet/core/install/
|
||||
* https://developer.android.com/studio
|
||||
|
||||
Holds concrete implementation for telemetry publishers and workers.
|
||||
To run this project on the Raspberry Pi you will need dotnet core 3.1. installed.
|
||||
|
||||
### NucuCar.Sensors
|
||||
|
||||
Manages all the car sensors. For more info see the readme file located in the project directory.
|
||||
|
||||
### NucuCar.TestClient
|
||||
## Building
|
||||
|
||||
Command line utility to play around with the car functionality. You can use it to remotely read data from the sensors via gRPC methods and to publish and read telemetry data.
|
||||
The following script provides instructions on how to build the whole project and deploy the NucuCar.Sensors module on the Raspberry Pi.
|
||||
|
||||
---
|
||||
|
||||
### Building and Running.
|
||||
|
||||
To build the project and target the Raspberry Pi you can use the following command:
|
||||
#### Manual
|
||||
|
||||
```$xslt
|
||||
// Build project
|
||||
dotnet build --runtime linux-arm -p:PublishSingleFile=true --configuration Release
|
||||
|
||||
// Navigate to desired project directory, for example NucuCar.Sensors.
|
||||
cd NucuCar.Sensors
|
||||
|
||||
// Create .tar
|
||||
tar -zcvf nh.tar.gz .\bin\Release\netcoreapp3.1\linux-arm\*
|
||||
|
||||
// Copy onto pi (replace with your ip, user)
|
||||
sftp pi@192.168.0.100
|
||||
sftp> put nh.tar.gz
|
||||
sftp> exit
|
||||
|
||||
// SSH into pi
|
||||
ssh pi@192.168.0.100
|
||||
|
||||
// Extract the archive and cd into it
|
||||
tar -zxvf nh.tar.gz
|
||||
cd bin/Release/netcoreapp3.1/linux-arm/
|
||||
|
||||
// Grant execution permissions
|
||||
chmod +x NucuCar.Sensors
|
||||
|
||||
// Run the program
|
||||
./NucuCar.Sensors
|
||||
```
|
||||
---
|
||||
|
||||
#### Docker-Compose
|
||||
|
||||
To run the project you can take advantage of `docker-compsose` and run it with the following commands:
|
||||
|
||||
```bash
|
||||
|
@ -51,3 +72,41 @@ git clone https://github.com/dnutiu/NucuCar.git
|
|||
cd NucuCar
|
||||
docker-compose up
|
||||
```
|
||||
_(This is not recommended as the performance will take a significant hit.)_
|
||||
|
||||
## Directory Structure Overview
|
||||
|
||||
### NucuHub.Android
|
||||
|
||||
Holds the Android application.
|
||||
|
||||
We are currently targeting Android API 29+.
|
||||
|
||||
### NucuCar.Domain
|
||||
|
||||
Holds common classes and interfaces that are required by the projects,
|
||||
provides all the types that are generated via protocol buffers and some utility classes.
|
||||
|
||||
### NucuCar.Telemetry
|
||||
|
||||
Holds concrete implementation for telemetry publishers and workers.
|
||||
The Telemetry project can be used by other projects such as
|
||||
NucuCar.Sensors to send telemetry into the cloud.
|
||||
|
||||
This project is not deployed.
|
||||
|
||||
### NucuCar.Sensors
|
||||
|
||||
Manages all the sensors. For more info see the readme file located in the project directory.
|
||||
|
||||
This module is runnable and is deployed on the Raspberry Pi.
|
||||
|
||||
### NucuCar.TestClient
|
||||
|
||||
Command line utility to play around with the car functionality.
|
||||
You can use it to remotely read data from the sensors via gRPC methods and
|
||||
to publish and read telemetry data.
|
||||
|
||||
### Docs
|
||||
|
||||
Holds project resources and documentation.
|
||||
|
|
Loading…
Reference in a new issue