# <center>3rd Week</center>
---
## Monday, July 15th 2019
---
### Setting up the arduino yun
Read the documentation right here [arduino yun](https://www.arduino.cc/en/Guide/ArduinoYunRev2)
**Programming the arduino**
For the testing, i make a simple blinking led and write to serial
Code:
```
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH);// turn the LED on (HIGH is the voltage level)
Serial.print("LED: ON");
Serial.println(", wait 20 sec");
delay(20000); // wait for 20 second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
Serial.print("LED: OFF");
Serial.println(", wait 20 sec");
delay(20000); // wait for 20 second
}
```
Setting up the node & mam
- Download the node.js lastest version to the desktop
https://nodejs.org/en/
- Create a folder and clone the git to that folder
git clone https://github.com/robertlie/dht11-arduino-uno.git
- Plug the arduino and check the port
`node listports.js`
- Testing the arduino output in the console
`node sensor.js`
**Fixing the mam.client**
- Download the mam.client.js from the lib
https://github.com/iotaledger/mam.client.js
- copy the mam.client.js lib to existing lib and replace the mam.client.js

become

n.b. the ori_mam.client was the existing file before which i didn't replace it
**Publishing data to tangle**
- install the npm
`npm install`
- run the mam_sensor
`node mam_sensor.js`

you could check your publish by copy the address to https://devnet.thetangle.org

- receive the previous data

Beware when you run to receive data from tangle. It could make your CPU get heat because of high processing

Report the activity to Mr. Denny
---
## Tuesday, July 16th 2019
---
Learn about IRI
Learn about cloud computing
### What is Cloud?
Cloud computing is a network diagram that can used for storage, management and processing data by remote servers hosted on the internet or in other words we don't need our local computer to compute the massive data.
It is centralized to one provider for using the services.
**Public Cloud**
They (Vendor) sells the computing services to anyone on the internet. They maintain large data centers full of computing hardware, and their customers share access to that hardware
**Private Cloud**
a proprietary network or a data center that supplies hosted services to a limited number of people.
Private Cloud used by some large enterprises for security reason or comply with various regulations
**Hybrid Cloud**
a combination of both a public and private cloud with some level of integration between the two. The reason company use hybrid cloud is for additional capacity during times of peak use.

The servers-hosted services are divided into three categories:
- Software as a service (SaaS)
a software delivery method that provides access to software and its functions remotely as a Web-based service
- Platform as a service (PaaS)
a computing platform being delivered as a service. Here the platform is outsourced in place of a company or data center purchasing and managing its own hardware and software layers
- Infrastructure as a service (IaaS)
Computer infrastructure, such as servers, storage and networking delivered as a service.
### Why Cloud?
- Flexibility
- Disaster Recovery
- Automatic Software Updates
- Capital-expenditure Free
- Work from everywhere
- Computing Scalability
**Examples**
Cloud computing in Software as a Service, e.g GoogleDocs, GoogleSlides, dropbox and etc.
Cloud computing in Platform as a Service, e.g AWS, Azure, OpenShift, Apache Stratos
Cloud computing in Infrastructure as a Service, e.g AWS EC2, Rackspace, Google Compute Engine (GCE), Digital Ocean, Magento 1 Enterprise Edition
### How cloud works?


## Wednesday, July 17th 2019
IOTA Full node
[Reference](https://iri-playbook.readthedocs.io/en/master/)
Make sure the server is clear from any installation or before installation could be gone
My cloud server specification:
>OS: CentOS Linux 7
>RAM: 16 GB RAM
>Virtualization: VmWare
>CPU: Intel(R) Xeon(R) E-2186G CPU @3.80 GHz
>Core: 4
>Provider: Chunghwa Telecom
1. Make sure you are user root
2. Install the IRI
`bash <(curl -s https://raw.githubusercontent.com/nuriel77/iri-playbook/master/fullnode_install.sh)`


Process

3. After done, Reboot and re-run the script

`bash <(curl -s https://raw.githubusercontent.com/nuriel77/iri-playbook/master/fullnode_install.sh)`
4. Installation Option will Prompt
let all blank and OK

> Nelson is used for auto-peering neighbor nodes
> HAProxy is a reverse proxy server for your node
> ZMQ metrics is a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications
5. Administrator username & password for IOTA full node


6. The playbook running
the parts which is OK

the parts which is get changed

7. Reboot & Rerun

`/opt/iri-playbook/rerun.sh`
**Error Issue**
Right here, i can't connect to the cloud server anymore via SSH. Therefore, i can't continue the process

Discussion with Mr Denny:
- Analyze Publish & Retrieve data from different nodes
- Analyze Transaction Speed
MAM reference
https://www.youtube.com/watch?v=L-O-okg0bWk
https://medium.com/coinmonks/iota-mam-eloquently-explained-d7505863b413
https://github.com/iotaledger/mam.client.js/
https://www.youtube.com/watch?v=BhBDmY8c6Fs
## Thursday, July 18th 2019
### Meeting with Prof. Ray, 09.00 AM - 12.30PM
- 2nd Week Report
### Discussion with Mr Denny
- Testing go-eth in Raspberry Virtual Machine
- IOTA security issue
- Survey another blockchain
### Debug and Implementation geth in Raspberry Pi
1. Install the lastest golang

2. Unpack & move to local


3. Export the Part

4. Clone the geth

5. Install library for 32 bit

Done

6. move directory to geth

7. Make the geth
`make` or `make geth`
Error Occured

8. Install the library
`Sudo apt-get install gcc-multilib`

9. Error Fixed, re-run the geth

10. Copy the geth bin to local bin

11. Create account

12. Got the Account address

## Friday, July 19th 2019
### Testing another node
The node list is available at https://iota.dance/
After the several testing of the nodes list, there are two different result that occured:
1. Connection Error

the nodes which send out this messages:
Mama.iota.family:14627
Pool.trytes.us:443
Ultranode.iotatoken.nl:443
Papa.iota.family:14627
Trinity.iota-tangle.io:14625
Node-iota.org:14627
Node.iota-tangle.io:14625
2. Invalid Transaction Hash

the nodes which send out this messages:
Nodes.iota.cafe:443
Node05.iotatoken.nl:443
Piota-node.com:443
Node04.iotatoken.nl:443
Node02.iotatoken.nl:443
Iotanode.us:443
Pow.iota.community:443
Wallet1.iota.town:443
Hanspetzernode.org:14627
Nodes.thetangle.org:443
Node.vanityfive.de:443
Perma.iota.partners:443
Node.deviceproof.org:443
Node01.iotatoken.nl:443
Node06.iotatoken.nl:443
According to IOTA foundation, the reason why transaction hash error occured is caused by the Minimum Weight Magnitude (MWM) from sender is not same with the target nodes.
### Learn about the minimum weight magnitude
All nodes in an IOTA network accept transactions whose hashes end in the same or higher number of 0 trits as their predefined MWM.
If a transaction ends in fewer 0 trits, the nodes in that network will reject it.
>For example, on the Mainnet, the MWM is 14. So, all transaction hashes must end in that number of 0 trits.
>If you were to send a transaction whose hash ends in 9 (the MWM on the Devnet) or 7 (the MWM on the Spamnet) 0 trits, no nodes on the Mainnet would accept it.
- Learn how to change the minimum weight