This week I was suppose to work with MSPI (Master Serial Pheriperal Interface), however I didn’t manage to complete the sensor module. So I had to continue with it this week. The digital touch sensor I created was incomplete as it is unable to be used like the sensors in real world. So this week I have to complete it’s function.

For digital sensor, my idea was creating another rectangle to represent the touch pad, so that whenever a user clicked on it, the sensor will return HIGH to the board. To do this, first I used a triggered event called ‘cell.pointerclick’ funtion in JointJs to allow the action on the touch pad. I also restricted this event to be triggered only when the touch pad is clicked. This is done by using ‘if’ function and rectangle id of the touch pad.

So above are the set ups for the digital touch senso. Next I need to figure out a way to store the output from the sensor. I found this difficult and ended up wasting too many time on this part. At the end, Dr Shawn suggested me to look at how OOP (Object Oriented Programming) works for JavaScript. This gave me a clearer thought of completing the sensor.

Starting from next week, I am going to work harder to catch up with the progress.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.