---
# System prepended metadata

title: <center>3rd Week</center>

---

# <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
![](https://i.imgur.com/phh435c.png)
become
![](https://i.imgur.com/1tmqhka.png)
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`
![](https://i.imgur.com/mcCLnvb.png)
you could check your publish by copy the address to https://devnet.thetangle.org
![](https://i.imgur.com/gNPILJT.png)


- receive the previous data
![](https://i.imgur.com/UqPt45p.png)


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

![](https://i.imgur.com/Xk7LT6k.png)

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.

![](https://i.imgur.com/6Z1Zedt.png)

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?
![](https://i.imgur.com/z1t9PRJ.gif)
![](https://i.imgur.com/dYju2GD.gif)


## 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)`
![](https://i.imgur.com/xOFlsHf.png)
![](https://i.imgur.com/hsJiUrN.png)
Process
![](https://i.imgur.com/Mcy4iRr.png)
3. After done, Reboot and re-run the script
![](https://i.imgur.com/3lYuvSh.png)
`bash <(curl -s https://raw.githubusercontent.com/nuriel77/iri-playbook/master/fullnode_install.sh)`
4. Installation Option will Prompt
let all blank and OK
![](https://i.imgur.com/T1KqMap.png)
> 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
![](https://i.imgur.com/FfZ9sqt.png)
![](https://i.imgur.com/nuODDXN.png)
6. The playbook running
the parts which is OK 
![](https://i.imgur.com/6CsJGey.png)
the parts which is get changed
![](https://i.imgur.com/oRKVjRM.png)

7. Reboot & Rerun
![](https://i.imgur.com/O1HHAJt.png)
`/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
![](https://i.imgur.com/VkTS0uC.png)

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
![](https://i.imgur.com/BWOl0h8.png)

2. Unpack & move to local
![](https://i.imgur.com/fi6eCpD.png)
![](https://i.imgur.com/ZqWIm6w.png)

3. Export the Part
![](https://i.imgur.com/S5vEcf4.png)

4. Clone the geth
![](https://i.imgur.com/h0cOCHu.png)

5. Install library for 32 bit
![](https://i.imgur.com/dQa1MHg.png)
Done
![](https://i.imgur.com/GdIgzKh.png)

6. move directory to geth
![](https://i.imgur.com/dOPc5gI.png)

7. Make the geth
`make` or `make geth`
Error Occured
![](https://i.imgur.com/RkaNMEy.png)
8. Install the library
`Sudo apt-get install gcc-multilib`
![](https://i.imgur.com/KUKlRIB.png)

9. Error Fixed, re-run the geth
![](https://i.imgur.com/nGX0MMt.png)
10. Copy the geth bin to local bin
![](https://i.imgur.com/IhjfdOu.png)

11. Create account
![](https://i.imgur.com/zZwFCzp.png)

12. Got the Account address
![](https://i.imgur.com/XrCTiSh.png)


## 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
![](https://i.imgur.com/ojJSfFW.png)
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
![](https://i.imgur.com/wZMZsJU.png)
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