跳到主要內容

發表文章

[Python] For Loop for 9x9 Multiplication Table

 "Just Share and Record my learning track" #For loop to show 9 X 9 matrix i=1 j=1 for i in range(1,10,1): for j in range (1,10,1): print (i*j, end= " ") print() For Loop Example in One line     Check the following blog to know it. http://pythonnote.blogspot.tw/2010/01/blog-post.html
最近的文章

[Python] While Loop for 9x9 Multiplication Table

  "Just Share and Record my learning track" #While Loop to display 9 x 9 matrix # Example 1 with i, j variables i = 1 j = 1 while i <= 9: while j <= 9: print(i * j, end = " ") j += 1 i += 1 j = 1 print() # Example 2 with x, y variables x=1 y=1 while x<=9: while y<=9: print(x*y, end=' ') y+=1 x+=1 y=1 print() # Error IndentationError: unexpected indent #Example 2 failed because of print() alignment problem

MQTT Origin Purpose and Hands On Connect Raspberry Pi and iPhone

    "Top-down doesn't work", quoting from Arlen Nipper,  President and CTO of Cirrus Link, speaks at Advantech 2016 Industrial IoT World Partner Conference. Youtube Link The following MQTT Broker application structure is from GTWang Blogger . I think this structure delivers a clear spirit of MQTT that is M2M, Device to Device, Tag to Tag communication. It is a flat structure and just like Arlen said, Top-down doesn't work, because there is no master-slave or top-down relation in it. The Origin of MQTT     MQTT(Message Queuing Telemetry Transport) was invented by Andy Stanford-Clark (IBM) and Arlen Nipper (Arcom, now Cirrus Link) back in 1999, when they faced AT&T regulation issue and turned to VSAT(satellite communication) solution to get data and control oil pipeline system. However, they could not use the traditional way to poll devices thru satellites due to data cost expensive and propagation delay. MQTT Benefits - Do More With Less     MQTT is

Demo MongoDB function in Raspberry Pi 3 with Node Red

Free source is every where on the internet especially for Linux system. Today, I wants to share how to run MongoDB on Raspberry Pi 3 and then use Node Red to get data and send data back to the database we just created. By doing this, you can just spend little money on Raspberry Pi 3 hardware and then you could start your way to build a data collection site with the latest flow-based programming tool, Node Red. Prepare  1. Refer to the detail and great instruction already post by http://recipes.item.ntnu.no/using-node-red-mongodb-to-gather-and-publish-data-on-a-raspberry-pi/ 2. Use SSH to log in Raspberry Pi 3 and start Node Red 3. Enter URL to Node Red at port 1880 and start draw the flow MonogoDB 1. Drag MongoDB block and Assign the Server IP address and DB name 2. Assign the Collection and Define operation as "Insert" 3. After Deploy, Go to Node Red UI and Test the switch function 4. Use SSH command to enter mongoDB shell and "use myDB"

PCI-1730 ECOM and EGND Connection Question

Real situation:    1. I can measure 12V at ECOM(pin28) when floating.      2. I know EGND for IDO usage.   Question :  I just have only one external 24V power supply, will it be OK to connect ECOM and EGND together for IDO and Wet contact DI detection at the same time? Answer:   Yes. Notice:   IDO may have voltage spike on GND when  switching an inductive load. This spike may cause DI detection stability problem.

PCI-1752U IDO Function Test with DAQNavi

When you have PIC-1752U IDO card function test request, you may try the following step to have a simple and quick function test. Prepare items:  HW: Windows Platform to insert PCI-1752U  SW: DAQNavi + PCI-1752U Driver Simple Steps: 1. Install and Open DAQNavi 2. Click Device Test Tap and select output 3. Fill in FF in textbox to turn on all output 4. Select Support Device to check Signal Connection 5. Wire PCI-1752U thru 100 pin SCSI cable to ADAM-39100, and use LED board to test the output function Finally, you could jump back to Device Test Page, and you may find the bug - all output channel show "turn off", but they are actually turning on. This may due to software bug not keeping DO status when switching pages.