Merge remote-tracking branch 'origin/main'

This commit is contained in:
Luca Warmenhoven
2024-05-08 15:47:45 +02:00
35 changed files with 488 additions and 121 deletions

View File

@@ -0,0 +1,34 @@
#include "SensorManager.h"
SensorManager sensorManager;
void setup() {
Wire.setClockStretchLimit(150000L); // Default stretch limit 150mS
Serial.begin(9600);
Serial.println("startup");
delay(10000);
sensorManager.sensorSetup();
}
void loop() {
SensorManager::Rotation rotation = sensorManager.readLoop();
// Convert quaternion to Euler angles in radians
float roll = atan2(2.0f * (rotation.w * rotation.i + rotation.j * rotation.k), 1.0f - 2.0f * (rotation.i * rotation.i + rotation.j * rotation.j));
float pitch = asin(2.0f * (rotation.w * rotation.j - rotation.k * rotation.i));
float yaw = atan2(2.0f * (rotation.w * rotation.k + rotation.i * rotation.j), 1.0f - 2.0f * (rotation.j * rotation.j + rotation.k * rotation.k));
// Convert to degrees
float rollDegrees = roll * 180.0f / PI;
float pitchDegrees = pitch * 180.0f / PI;
float yawDegrees = yaw * 180.0f / PI;
Serial.print(roll);
Serial.print(" ");
Serial.print(pitch);
Serial.print(" ");
Serial.print(yaw);
Serial.println();
}

View File

@@ -0,0 +1,52 @@
#include "SensorManager.h"
#include <Wire.h>
SensorManager::SensorManager() {}
void SensorManager::sensorSetup() {
Serial.println();
Serial.println("BNO080 Read Example");
delay(1000); // Wait for BNO to boot
Wire.begin();
if (myIMU.begin() == false) {
delay(1000);
Serial.println(".");
}
Wire.setClock(400000); //Increase I2C data rate to 400kHz
myIMU.calibrateAll(); //Turn on cal for Accel, Gyro, and Mag
myIMU.enableGyroIntegratedRotationVector(100);
myIMU.enableMagnetometer(100); //Send data update every 100ms
myIMU.saveCalibration(); //Saves the current dynamic calibration data (DCD) to memory
myIMU.requestCalibrationStatus(); //Sends command to get the latest calibration status
if (myIMU.calibrationComplete() == true) {
Serial.println("Calibration data successfully stored");
}
Serial.println(F("magnetometer rotation enabled"));
}
SensorManager::Rotation SensorManager::readLoop() {
if (myIMU.dataAvailable() == true) {
float i = myIMU.getQuatI();
float j = myIMU.getQuatJ();
float k = myIMU.getQuatK();
float w = myIMU.getQuatReal();
Rotation rotation = { i, j, k, w };
return rotation;
}
else {
float i = myIMU.getQuatI();
float j = myIMU.getQuatJ();
float k = myIMU.getQuatK();
float w = myIMU.getQuatReal();
Rotation rotation = { i, j, k, w };
return rotation;
}
}

View File

@@ -0,0 +1,22 @@
#ifndef SensorManager_h
#define SensorManager_h
#include "Arduino.h"
#include "SparkFun_BNO080_Arduino_Library.h"
class SensorManager {
public:
SensorManager();
void sensorSetup();
struct Rotation {
float i;
float j;
float k;
float w;
};
Rotation readLoop();
private:
BNO080 myIMU;
};
#endif

View File

@@ -0,0 +1 @@
#include "SensorManager.h"

View File

@@ -3,19 +3,18 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../../../../../layout/custom_preview.xml" value="0.35989583333333336" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.358695652173913" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.136" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_completion_screen.xml" value="0.18541666666666667" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.12" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.22826086956521738" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_power_screen.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.18541666666666667" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.18541666666666667" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.18125" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/menu/main_menu.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_sport_item.xml" value="0.2341485507246377" />
<entry key="app/src/main/res/layout/activity_sport_menu.xml" value="0.22056159420289856" />
<entry key="app/src/main/res/layout/header.xml" value="0.1" />
<entry key="app/src/main/res/layout/sport_menu_item.xml" value="0.22056159420289856" />
</map>
</option>
</component>

View File

@@ -16,7 +16,8 @@
android:exported="false" />
<activity
android:name=".ui.SportMenuActivity"
android:exported="false" />
android:exported="true">
</activity>
<activity
android:name=".BicepVideo"
android:exported="false" />
@@ -25,7 +26,7 @@
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="false" />
android:exported="true" />
<activity
android:name=".MainScreen"
android:exported="true" >

View File

@@ -1,24 +1,20 @@
package com.example.fitbot;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.QiSDK;
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
import com.aldebaran.qi.sdk.builder.AnimationBuilder;
import com.aldebaran.qi.sdk.builder.SayBuilder;
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
import com.aldebaran.qi.sdk.design.activity.conversationstatus.SpeechBarDisplayStrategy;
import com.aldebaran.qi.sdk.object.actuation.Animate;
import com.aldebaran.qi.sdk.object.actuation.Animation;
import com.aldebaran.qi.sdk.object.conversation.Phrase;
import com.aldebaran.qi.sdk.object.conversation.Say;
import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
import com.example.fitbot.ui.SportMenuActivity;
public class MainActivity extends RobotActivity implements RobotLifecycleCallbacks {
@@ -26,7 +22,12 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Register the RobotLifecycleCallbacks to this Activity.
Button button = findViewById(R.id.menu_switch_btn);
button.setOnClickListener(v -> {
startActivity(new Intent(MainActivity.this, SportMenuActivity.class));
});
QiSDK.register(this, this);
}
@Override

View File

@@ -36,6 +36,7 @@ public class MainScreen extends AppCompatActivity {
/*---Navigation Drawer Menu---*/
navigationView.bringToFront();
ActionBarDrawerToggle toggle=new
ActionBarDrawerToggle(this,drawerLayout,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
drawerLayout.addDrawerListener(toggle);

View File

@@ -0,0 +1,55 @@
package com.example.fitbot.processing;
public class MotionData {
// Data of the motion sensor
public float accelerationX;
public float accelerationY;
public float accelerationZ;
public float rotationX;
public float rotationY;
public float rotationZ;
// Delimiter for the data received from the motion sensor
private static final String DATA_DELIMITER = ";";
/**
* Constructor for the MotionData class.
*
* @param accelerationX The acceleration in the X axis in m/s^2.
* @param accelerationY The acceleration in the Y axis in m/s^2.
* @param accelerationZ The acceleration in the Z axis in m/s^2.
* @param rotationX The rotation in the X axis in degrees.
* @param rotationY The rotation in the Y axis in degrees.
* @param rotationZ The rotation in the Z axis in degrees.
*/
public MotionData(float accelerationX, float accelerationY, float accelerationZ, float rotationX, float rotationY, float rotationZ) {
this.accelerationX = accelerationX;
this.accelerationY = accelerationY;
this.accelerationZ = accelerationZ;
this.rotationX = rotationX;
this.rotationY = rotationY;
this.rotationZ = rotationZ;
}
/**
* Function for decoding a string into a MotionData object.
* This string must contain the data of the motion sensor
* separated by the delimiter. (;)
*
* @param data The string containing the data of the motion sensor.
* @return An instance of MotionData.
*/
public static MotionData decode(String data) {
String[] parts = data.split(DATA_DELIMITER);
return new MotionData(
Float.parseFloat(parts[0]),
Float.parseFloat(parts[1]),
Float.parseFloat(parts[2]),
Float.parseFloat(parts[3]),
Float.parseFloat(parts[4]),
Float.parseFloat(parts[5])
);
}
}

View File

@@ -0,0 +1,31 @@
package com.example.fitbot.processing;
import java.io.InputStream;
/**
* Class representing the input stream of the motion sensor.
* This class will be responsible for reading the data from
* the motion sensor and processing it, by creating a
* server and starting a WebSocket connection with the ESP32.
*/
public class MotionInputStream extends InputStream {
/**
* Function for starting the listening process
* of the motion sensor. This function will
* @return An instance of MotionInputStream.
*/
public static MotionInputStream startListening()
{
// Create server
return null;
}
@Override
public int read() {
return 0;
}
}

View File

@@ -0,0 +1,4 @@
package com.example.fitbot.processing;
public class MotionProcessor {
}

View File

@@ -6,6 +6,9 @@ import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
/**
* SpeechGenerator class for generating speech for the robot
*/
public class SpeechGenerator {
private static final Locale DUTCH_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
@@ -21,13 +24,18 @@ public class SpeechGenerator {
say(phrase, ctx, DUTCH_LOCALE);
}
public static void say(String text, QiContext ctx, Locale locale)
/**
* Function for making the robot say something with a specific locale
* @param phrase The phrase to make the robot say
* @param ctx The QiContext to use
* @param locale The locale to use
*/
public static void say(String phrase, QiContext ctx, Locale locale)
{
SayBuilder.with(ctx)
SayBuilder
.with(ctx)
.withLocale(locale)
.withText(text)
.withText(phrase)
.build()
.run();
}

View File

@@ -1,21 +0,0 @@
package com.example.fitbot.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.example.fitbot.R;
public class SportItemActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sport_item);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}

View File

@@ -1,22 +0,0 @@
package com.example.fitbot.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.example.fitbot.R;
public class SportMenuActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sport_menu);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}

View File

@@ -1,45 +0,0 @@
package com.example.fitbot.ui;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import com.example.fitbot.sports.ESportType;
public class SportMenuItem extends View {
private Paint backgroundPaint, textPaint;
private String title, description;
private Bitmap imageResource;
private Rect imageRect, elementRect;
private ESportType type;
public SportMenuItem(Context context, ESportType type, String title, String description, Bitmap backgroundImage) {
super(context);
this.title = title;
this.description = description;
this.imageResource = backgroundImage;
this.imageRect = new Rect(0, 0, this.imageResource.getWidth(), this.imageResource.getHeight());
this.elementRect = new Rect(0, 0, this.getWidth(), this.getHeight());
this.type = type;
this.backgroundPaint = new Paint();
this.textPaint = new Paint();
this.textPaint.setTextAlign(Paint.Align.CENTER);
this.backgroundPaint.setColor(0xFFF0F0F0);
this.textPaint.setColor(0xFF000000);
this.setOnClickListener(v -> context.startActivity(new Intent(context, SportItemActivity.class)));
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawBitmap(this.imageResource, this.imageRect, this.elementRect, null);
canvas.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10, backgroundPaint);
canvas.drawText(title, getWidth() / 2.0f, this.textPaint.getFontMetrics().top, textPaint);
}
}

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -19,14 +19,17 @@
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/header"
app:menu="@menu/main_menu" />
<Button
android:id="@+id/menu_switch_btn"
android:layout_width="200dp"
android:layout_height="50dp"
android:clickable="true"
android:text="Go to Sport Menu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
app:layout_constraintLeft_toLeftOf="parent"
android:focusable="true" />
</android.support.v4.widget.DrawerLayout>

View File

@@ -15,7 +15,7 @@
android:layout_height="150dp"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:src="@drawable/robotlogo"
android:src="@drawable/robot_logo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -23,6 +23,14 @@ nav:
- 🤖 Pepper:
- Pepper Setup: documentation/pepper/pepperSetup
- Pepper movement: documentation/android/robotmovement
- 👷‍♀️ Hardware:
- 📦 Hardware:
- Hardware: documentation/hardware/sensors
- 🍓 Raspberry Pi:
- Raspberry Pi: documentation/raspberryPi/raspberryPiSetup
- NodeJs:
- NodeJs: documentation/raspberryPi/nodeJs/nodeJs
- NodeJs Setup: documentation/raspberryPi/nodeJs/nodeSetup
- MariaDB:
- MariaDB: documentation/raspberryPi/mariaDB/mariaDB
- MariaDB Setup: documentation/raspberryPi/mariaDB/mariaSetup

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -5,14 +5,48 @@ As we become older, our vision worsens. We need to keep this in mind because our
![contrast](contrastcolors.png)
This image shows what elderly people may experience while reading or using an app. We must keep this in mind as we design our app.
### color psychology
Colors can be an effective way to influence emotions and feelings. They may influence you without your knowledge. We can use this to influence those who use our app. Colors have a powerful ability to influence emotions. Every color has a unique effect on our minds. For example, blue has a calming and trustworthy effect on our minds. While blue may not be appropriate for our project, it may prove useful when using a more serious app. We can see PayPal using this trend because it is a banking app that must be trusted. Because blue influences those who use PayPal, it will have a positive impact on their customers. We also want to positively influence our people.
Here are some examples of how colors can be used in a fitness app for elderly people. First we need to sort out what kind of emotions we want to stimulate. For starting and doing the excersize we need to boost excitement, energy and strenght. We need to boost these emotions to get the most out of people. We hope by using these colors we are stimulating people to get more out of there work out. The reason of boosting emotions trough color is that is is seamless and that makes it powerfull. If you dont know that you are being influenced it has the best effect. Lets discuss some colors
<span style="color:red">
<strong> RED: </strong>
</span>
Red is an interesting color because it increases excitement, activity, aggression, bravery, and youthfulness. People associate the color red with boldness, fire, competition, love, energy, speed, power, youth, and so much more. These emotions are useful when developing a fitness app, but even a different shade of red affects emotions and effectiveness. Lighter shades highlight the energetic qualities of red. Darker shades emphasize power. This makes red a powerful color and for us and an interesting option because Strava, a fitness app focused on running, uses the same colors.
![palettes of red](redpalette.png)
<span style="color:yellow">
<strong> YELLOW: </strong>
</span>
Yellow belongs in the same park as red because they are both warm colors. Yellow boosts emotions such as warmth, cheerfulness, happiness, energy, clarity, and attention, making it a good choice for us to look at. People associate the color or yellow with. Sunshine, creativity, imagination, hope, joy, the future, and spirituality. The various shades affect yellow in different ways, and bright sharp yellows can be tiring and cause headaches. Lighter shades appeal to the happiness aspect, reminding users of summer and the sun. Darker shades, such as gold, add weight. This makes yellow an interesting color option for our app.
![palettes of yellow](yellowpalette.png)
<span style="color:green">
<strong> GREEN: </strong>
</span>
Green is on the opposite side of the spectrum from red and yellow. Green is a colder color, which gives it a different effect. Green enhances emotions such as restful, natural, stable, healthy, and prosperity. This can make it a viable option, especially because it gives people a sense of good health. People associate color green with. Freshness, ecology, nature, health, balance, fertility, growth, renewal, healing, money, and good luck. This is interesting because it not only provides people with the feeling of being healthy, but also of being outside in nature, which may help elderly people feel less isolated. However, the shades of green also make people feel different. Pale greens are soothing. Dark greens can improve concentration. However, because we do not rely on concetration, it will have little impact on our project.
![palletes of green](greenpalette.png)
<span style="color:BLUE">
<strong> BLUE: </strong>
</span>
Blue is also a colder color, so it takes the same path as green, giving it a more calming effect. However, it is not comparable to green because they influnce other emotions. Blue enhances emotions like calm, security, peace, patience, loyalty, trust, and sadness. It has the same soothing effect as green, but it does not give people the feeling of being healthy. It gives people trust and peace, which are interesting emotions, but they are not beneficial to us. People associate the color blue with stability, protection, trust, loyalty, patience, perseverance, security, peace, loyalty, sadness and depression, and masculinity. This further confirms that blue gives people a sense of security, which is not important for us because we want people to start exercising. Pale blue is cooling and relaxing, but it should not be used inappropriately because it can make people feel sad and depressed. Indigo is useful in situations where fear prevents activity. Indigo may be useful for a cool-down exercise or if someone is afraid of exercising.
![palletes of blue](bluepalette.png)
### Conclusion
We decided to go for
# Source
https://eldertech.org/color-in-designing-technology-for-seniors/
https://eldertech.org/color-in-designing-technology-for-seniors/
https://decode.agency/article/choose-color-palette-for-apps/

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

@@ -0,0 +1,24 @@
# PCB
## Headerpins
```
#define PIN_IMU_SDA D2
#define PIN_IMU_SCL D1
#define PIN_IMU_INT D5
#define PIN_IMU_INT_2 D6
```
## What does the pcb do
The pcb on itself is a espd1mini with no sensors or battery. You need to manual solder a battery and sensor of your choice to the pcb.
## Original usage
These pcb's where originally designed for virtual reality fullbody tracking. They are basicly movement trackers that can be used to track the movement of the body. We can also use this really well for our project.
## Why did we choose this pcb
We chose this pcb because its really small and it has a socket for a sensor and it also has a build in bms for the battery.
## Usage in our project
We are going to rotational data from the sensor and use that to give feedback to the user based on how well they did the exercise.
![alt text](../assets/pcbImage.png)
### Sources
* https://github.com/Sorakage033/SlimeVR-CheeseCake

View File

@@ -0,0 +1,3 @@
# MariaDB
MariaDB is a fork of MySQL and is a popular choice for database management systems. It is open-source and is widely used in web applications. MariaDB is a community-driven project and is developed by the original developers of MySQL. It is designed to be fully compatible with MySQL, meaning that it can be used as a drop-in replacement for MySQL.

View File

@@ -0,0 +1,70 @@
# MariaDB
MariaDB is a fork of MySQL and is a popular choice for database management systems. It is open-source and is widely used in web applications. MariaDB is a community-driven project and is developed by the original developers of MySQL. It is designed to be fully compatible with MySQL, meaning that it can be used as a drop-in replacement for MySQL.
In this guide, we will show you how to install MariaDB on your Raspberry Pi. This will allow you to create and manage databases on your device.
## Prerequisites
Before you begin, you will need the following:
- A Raspberry Pi with Raspbian installed
- Access to the terminal on your Raspberry Pi
## Installation
### Step 1: Update the Package List
The first step is to update the package list on your Raspberry Pi. This will ensure that you have the latest information about available packages.
Run the following command to update the package list:
```bash
sudo apt update
```
### Step 2: Install MariaDB
Next, you will need to install the MariaDB server on your Raspberry Pi. You can do this by running the following command:
```bash
sudo apt install mariadb-server
```
During the installation process, you will be prompted to set a root password for the MariaDB server. Enter a secure password and remember it, as you will need it to access the database server.
### Step 3: Secure the MariaDB Installation
After installing MariaDB, you should secure the installation by running the `mysql_secure_installation` script. This script will guide you through the process of securing your MariaDB installation by setting a root password, removing anonymous users, disallowing remote root login, and removing the test database.
Run the following command to start the `mysql_secure_installation` script:
```bash
sudo mysql_secure_installation
```
Follow the prompts to secure your MariaDB installation.
### Step 4: Access the MariaDB Shell
Once you have secured the MariaDB installation, you can access the MariaDB shell by running the following command:
```bash
sudo mysql -u root -p
```
Enter the root password that you set during the installation process. You should now be logged into the MariaDB shell.
## Conclusion
You have successfully installed MariaDB on your Raspberry Pi. You can now create and manage databases using MariaDB on your device. If you have any questions or run into any issues, feel free to refer to the [MariaDB documentation](https://mariadb.com/kb/en/) for more information.
---

View File

@@ -0,0 +1,3 @@
# NodeJs
NodeJs is a JavaScript runtime that is built on Chrome's V8 JavaScript engine. It is designed to be lightweight and efficient, making it perfect for running on the Raspberry Pi. This is a file that

View File

@@ -0,0 +1,98 @@
# NodeJs Setup
https://pimylifeup.com/raspberry-pi-nodejs/
## Prerequisites
Before you begin, you will need the following:
- A Raspberry Pi with Raspbian installed
- Access to the terminal on your Raspberry Pi
## Installation
### Step 1: Update the Package List
The first step is to update the package list on your Raspberry Pi. This will ensure that you have the latest information about available packages.
Run the following command to update the package list:
```bash
sudo apt update
```
### Step 2: Install Node.js
Next, you will need to install Node.js on your Raspberry Pi. You can do this by running the following command:
```bash
sudo apt install nodejs
```
### Step 3: Install npm
After installing Node.js, you will also need to install npm, which is the Node.js package manager. You can do this by running the following command:
```bash
sudo apt install npm
```
### Step 4: Verify the Installation
To verify that Node.js and npm have been installed correctly, you can check the versions of both tools by running the following commands:
```bash
node -v
npm -v
```
If the installation was successful, you should see the version numbers of Node.js and npm displayed in the terminal.
### Step 5: Create a Test File
To test that Node.js is working correctly on your Raspberry Pi, you can create a simple test file. Create a new file called `test.js` by running the following command:
```bash
nano test.js
```
In the text editor, add the following code:
```javascript
console.log('Hello, World!');
```
Save and exit the text editor by pressing `Ctrl + X`, then `Y`, and finally `Enter`.
### Step 6: Run the Test File
To run the test file, use the following command:
```bash
node test.js
```
If Node.js is working correctly, you should see `Hello, World!` displayed in the terminal.
Congratulations! You have successfully installed Node.js on your Raspberry Pi. You can now start developing applications using Node.js on your device.
If you have any questions or run into any issues, feel free to refer to the [Node.js documentation](https://nodejs.org/en/docs/) for more information.
## Conclusion
You have successfully installed Node.js and npm on your Raspberry Pi. You can now use these tools to develop and run Node.js applications on your device. If you have any questions or run into any issues, feel free to refer to the [Node.js documentation](https://nodejs.org/en/docs/) for more information.

View File

@@ -0,0 +1,3 @@
# Raspberry Pi Setup
To setup the Raspberry Pi, follow the guide in the this [link](https://knowledgebase.hbo-ict-hva.nl/1_beroepstaken/infrastructuur/realiseren/edge_computing/raspberry_pi/respberry_pi_installation/).

View File

@@ -1,7 +1,7 @@
# Hoofd en deelvragen met bronnen
## Hoofdvraag
Wat zijn de gevolgen op ouderen door menselijke communicatie vervangen met robots in de ouderenzorg?
Wat zijn de gevolgen op ouderen van menselijke communicatie voor een deel te vervangen met robots in de ouderenzorg?
## Deelvragen
1. Wat zijn de voor en nadelen van robots in de ouderenzorg?

View File

@@ -158,19 +158,19 @@ Done
To do
- Mindmap project
- Issues for sprint 2
- Figma design for the app
Done
-
- Issues for sprint 2
**8 May**
To do
-
- Figma design for the app
- Setup the Pi
Done

View File

@@ -91,7 +91,7 @@ In de method `onRobotFocusGained` wordt een `Say` actie gemaakt en uitgevoerd. D
Encapsulation is een princiepe om de interne gegevens van een object te verbergen en alleen toegang te geven via methods.
Voorbeeld: Een bank heeft verschillende methods om geld te storten, geld op te nemen, saldo te controleren, enz. We kunnen niet rechtstreeks toegang krijgen tot de interne gegevens van de bank, zoals de balans, de rekeningnummers, enz. We moeten de methods van de bank gebruiken om deze gegevens te krijgen.
p
Use case:
```java