Pages

Tampilkan postingan dengan label 7. Tampilkan semua postingan
Tampilkan postingan dengan label 7. Tampilkan semua postingan

Minggu, 29 Mei 2016

7 15 DIY「魚菜共生系統」實況

??????????????????????????????????Chris??????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

  
????????7/15???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????10????????????????????????email?????????7/12????????????????11??????????????????????????????7/13??????????????????????????????????????????? 7/15??????9??????????????????????????????????????DIY????

 

??????????DIY??????????


??????


?????????????????


??????DIY??????????


??9:30?????????????????????????


????Sunny????? 



????????????????????????????????????????



?????????????!


 

 
 

????DIY????!

????????????????????????


????????????????????????????


???????????????

 


 

?????Hiroshi???? 

Hiroshi??????????Jesse

 
?????????

??????????????????


 ??????????????????????????????
Read More..

Minggu, 22 Mei 2016

9 Jeremy Blum Arduino Wireless Tutorial MCU Group Mtg August 7

Tonights post is a bit of a preview of Jeremys #9 Arduino video tutorial about wireless, along with a couple related comments and alternatives regarding microcontroller (MCU) wireless tutorials for future use by the Humboldt Microcontrollers Group.

But before I get into the Arduino wireless tutorial, there are two special deal items for people who buy MCU-related electronic components. I found out about these from SparkFun and Jameco emails.
  1. SparkFun Retrosparktive:  "SparkFun will be vacating its offices at 6175 Longbow and moving on up to Dry Creek Parkway...As part of the Retrosparktive, each week we are offering up a selection of classic products at “historically low prices” (sorry, couldn’t help myself). We’re calling this first selection the “Bare Necessities” - great things to have around your workspace or office. This selection of items is only on sale from 8/4/2014 at 12:01 a.m. MT until 8/10/14 at 11:59 p.m. MT - so get ‘em while you can! BUT WAIT, THERE’S MORE! We’re also offering a promo code good for $10 off any orders over $40. Just put the code “RETROSPARK” into the box at checkout to get your discount. This code is good until August 31, 2014."
  2. Jameco Free Friday Electronic Components Giveaway:  "Jamecos team of component buyers hunts for special buys and every Friday we will highlight one of these great buys by making a limited supply of one product available for free at www.Jameco.com/Free. Well
    post new inventory every Friday at 10 a.m. Pacific Time and it will be available on a first come, first serve basis
    ."
The next Humboldt Microcontrollers Group meeting is this Thursday, August 7. The main topic of the meeting will be to discuss Jeremy Blums #9 video tutorial, so tonights post takes a look at that tutorial. The topic is wireless communications with Arduino, and the #9 video exercise uses XBee radios. Wikipedias entry on this type of wireless communication equipment says:
"XBee is the brand name from Digi International for a family of form factor compatible radio modules. The first XBee radios were introduced under the MaxStream brand in 2005 and were based on the 802.15.4-2003 standard..."
The XBee brand has a wide range of models, with 2.4 GHz and 900Hz options, and the XBee-PRO 900HP is listed as having a 28 mile range. Having an Arduino communicate wirelessly 20+ miles away without cellular or Internet service seems like it could be handy for some things.

XBee is a brand name, and generally speaking, follows the ZigBee protocol for wireless personal area networks (WPAN). However, not all XBee technology is compatible with everything in the Zigbee world. For different views of what XBee is and how compatible it is, see the Digi International page about this, the SparkFun XBee Buying Guide or the StackExchange thread on the topic, which says:
"ZigBee / ZigBee Pro are mesh communication protocols that sits on top of IEEE 802.15.4 PHY. XBee / XBee Pro are product names for radio communications modules made by Digi. The modules can be loaded with various firmwares to support ZigBee / ZigBee Pro / DigiMesh and come in several frequency bands. DigiMesh is an alternative to ZigBee that changes a few things, and adds some features to make it generally better to work with. But, you sacrifice compatibility with ZigBee devices. For example DigiMesh allows routers to sleep, has lower overhead, has 1 node type vs zigbees 3 leading to a more robust mesh, can run at higher data rates, etc."
Boards for the #9 video tutorial
The moral of the story for MCU beginners like me is, if you want to do wireless communications with MCUs, use all the same brand and model of wireless radios. No need to try and figure out if your circuit doesnt work because the two or more radios arent compatible -- youll have enough fun just figuring out if the circuit is hooked up incorrectly or if your code has errors or poor design.

The exercise in Jeremys #9 video uses these boards -- two Arduino Unos, two XBee transceiver modules, two XBee shields, and a SparkFun USB to XBee adapter. In addition, youll need a stepper motor, a mini-B USB cable and a few other parts you probably have from other Arduino projects or tutorial exercises. Jeremy shows how to program the Xbee units ID numbers and how to hook up the Arduinos and other components. Then he walks the video viewer through the steps to write the program which allow the potentiometer connected to one Arduino to wirelessly control the position of the stepper motor which is connected to the other Arduino.
#9 exercise wired to breadboard

Excluding the two Arduinos and the miscellaneous parts you probably have, you can spend over $100 just on parts for the exercise in the #9 video. Ed Smith didnt have all the parts lying around to do this exercise and figured out an alternative exercise with a couple radios and other parts he did have around. He said hell explain on August 7th what he put together for an MCU wireless exercise.

The Humboldt Microcontrollers Group should consider discussing cost-effective options for a useful training session on MCU wireless technology.There are lots of options, but a couple starter ideas are:
  1. Have people work in groups of two or three to do essentially the same exercise Jeremy demonstrates. The people can buy different parts that they want to keep after the exercise, or one person can buy all the parts and keep them when the training is finished.
  2. Do essentially the same exercise as the #9 video, but identify less expensive components than the Arduino and XBee parts specd by Jeremy.
  3. Use one wireless radio instead of two and find or write a tutorial involving one radio.
Others in the MCU group will know or think of additional options for MCU wireless training sessions. A couple specific training sessions I found in a quick search were:
CC3000
  1. Wireless Gardening with Arduino + CC3000 WiFi Modules by Adafruit. I like this one because of the Humboldt MCU Garden project. The garden project would make the investment seem more useful than it would for a generic training exercise. Heres the CC3000 module from Adafruit, and heres a post about the CC3000 by ladyada.
  2. SparkFun has two MCU wireless tutorials; Arduino Wireless Communication via the Electric Imp and Wireless Arduino Programming with Electric Imp.
  3. Arduino Wireless SD Shield Tutorial from Instructables is one of the many Arduino Wi-Fi tutorials.
CC3200 LaunchPad
We could also find or develop a training session around one of the newer MCUs with built-in WiFi, such as the SimpleLink products from Texas Instruments (e.g. the CC3200 LaunchPad) or one of the other MCU manufacturers MCU with integrated Wi-Fi. Identifying some of those other integrated wireless / Wi-Fi components will likely be the subject of future research and blog posts.

In addition to discussing MCU wireless on Thursday, the MCU group will likely talk about upgrades to the Humboldt Laser Harp (HLH). After its debut performance in Eureka on August 2, weve got several improvements in mind. Im hopeful the HLH will make an appearance at the MCU group meeting on Thursday so everyone at the meeting can play with it and get excited about improving it, about making additional laser harps, and about designing and building other electronic music-light instruments which will help create the Humboldt Electronic Light Orchestra.

If you havent watched the #9 video, check it out. If you dont have time to watch it between now and Thursday but are interested in MCU wireless, come to the MCU group meeting anyway. Were looking forward to seeing you from 6 to 8 PM on Thursday, August 7, at 1385 8th Street, Arcata, CA.

**********
Read More..

Sabtu, 21 Mei 2016

7 Jeremy Blum Video Arduino And Processing Sketches

Today’s blog post takes a look at some of the programming concepts used in the #7 Jeremy Blum ‘Arduino tutorial series’ video.
#7 video exercise Arduino circuitry

The Arduino exercise in the #7 video uses a Microchip Technology TC74A0-5.0VAT temperature sensor to acquire temperature data and display it on the computer to which your Arduino circuitry is connected. To do these two tasks, you’ll need two programs. An Arduino program will be used to grab and transmit the temperature data. Then a Processing program will be used to take that temperature data and display it in the specified font on your computer’s monitor.

The Arduino program Jeremy wrote is called read_temp.pde. He makes the programs for the video tutorial series available online, but you’ll gain a lot more skill with Arduinos if you type the programs yourself rather than downloading them, at least while you’re learning new programming concepts. Arduino.cc explains the .pde files from the Arduino IDE (Integrated Development Environment) this way:
“The Arduino environment uses the concept of a sketchbook: a standard place to store your programs (or sketches)...Beginning with version 1.0, files are saved with a .ino file extension. Previous versions use the .pde extension. You may still open .pde named files in version 1.0 and later, the software will automatically rename the extension to .ino.”
So the reason Jeremy’s read_temp Arduino file is has a .pde extension instead of .ino is because the video is a couple years old, and he was using an earlier version of the Arduino IDE. The current IDE version is 1.0.5, with the Beta version being at 1.5.7. The .pde file extension (Processing Development Environment) is the one used by the Processing, Wiring and early-version Arduino IDEs. Processing is often used as an educational tool to teach foundational programming skills in a visual environment and is Java based rather than C.

To have the Arduino get the temperature data from the Microchip sensor, which is done with read_temp.pde, Jeremy starts out by importing the I2C library. For Arduino this is the Wire library. Importing the Wire library is done with the command:

#include <Wire.h>

Next you set the I2C temperature address. For the sensor he used, the I2C address ID was 72, per the #6 video.

int temp_address = 72;

In the setup section for the sketch, you have to start the serial communication and initialize the Arduino listening on I2C communication bus, using:

Serial.begin(9600);
Wire.begin();

The loop section of the sketch has the components shown below. I won’t write out all the code here -- when you go through the exercise, you’ll get a chance to learn what’s needed to accomplish each task shown in the list of loop section comments below.

//Send a request
//Start talking
//Ask for Register zero
//Complete transmission
//Request 1 byte
//Wait for response
//Get the temperature
//Convert from Celsius to Fahrenheit
//Print the results
//Delay, then do it again

Warming temperature sensor; terminal window temperature display
After the above steps are all written for the Arduino sketch, you upload it to your Arduino. Following a successful upload of the Arduino sketch, you’ll see the current temperature of the sensor displayed in a terminal window. Jeremy then puts his finger and thumb over the sensor to confirm that the sensor can measure the difference between the room air and Jeremys skin temperature. To get a temperature display other than just in the terminal window, you need to write a Processing sketch. This will display on your computer monitor the temperature results generated by the temperature sensor circuitry and the Arduino sketch. The Processing file Jeremy wrote to display the temperature on the computer’s monitor is display_temp.pde.

Associated with display_temp.pde is the .vlw file AgencyFB-Bold-200.vlw. The .vlw file type is a font file created by the Processing language. Processing will create the .vlw data file for a font that’s on your computer system when you use the Tools / Create Font command. After you create the data file you can use it in your Arduino / Processing program with the loadFont() function. If you want to dig into the loadFont() function in Processing, two resources are the relevant Processing reference webpage and a tutorial from Purchase College.
Creating a font in Processing

Start out by selecting Tools / Create Font in the Processing sketch window. Select one of the font styles shown in the Create Font window. Next, select the font size you want to use. Jeremy selects 200 for the size so it will create a large font on the computer monitor. When you click OK in the Create Font window, it will create a .vlw file for the specified size font.

Next, write the initial components of the code shown on the video, including things like defining the variables for the program, then do the setup and draw sections of the sketch. After the initial components of the sketch are written, you setup the ‘canvas’ where you’ll display the font, using the command:

size (400, 400);

After setting up the canvas, set up the serial port, using the command:

port = new Serial(this, “COM3”, 9600);

Once the serial port is set up, you tell it to keep looking for information until it gets to the end, which has been defined by a period. You tell it to look for that info with the command:

port.bufferUntil(‘.’);

Next, set up the font, specifying the .vlw file that you created earlier, using the commands:

font = loadFont(“AgencyFB-Bold-200.vlw”);
textFont (font, 200);

I think the 200 is optional in the second line, since the .vlw file specified already defines that it’s a 200 point font. I don’t know if you can use a non-sized font file in the loadFont function, such as AgencyFB-Bold.vlw, then specify the size in the textFont function. Haven’t had time to dig into that Processing function yet; maybe a blog post reader can point out where the Processing.org website explains that, or I might research it in the future. For now, I’ll just type it the way Jeremy did.

Next, write the commands for the draw section of the sketch, which tells the computer what characters to display on the monitor. Do this with the background, fill and text commands. Per the discussions in the recent blog post, “#7 Jeremy Blum Video: I2C And Processing,” you’ll have to use an RGB color chart or list to specify what color you want the background and the text. You also have to specify which variable strings (temperature labels to go with the temperature data) the Processing sketch should ‘draw.’

Now write the serialEvent section of the sketch to grab the temperature data off the serial port, then use a substring command to reformat the information by removing the period at the end, using the commands:

data = port.readStringUntil(‘.’);
data = data.substring(0, data.length() - 1);

Next you write the code for finding the comma in the string, for fetching the Celsius data and Fahrenheit data (as shown in the video).

Once you’re done writing the Processing sketch as described above, click on the Run icon in the Processing sketch window and your computer should display the temperature currently being
measured by the Microchip temperature sensor, as captured and transmitted by your Arduino. If it doesn’t display the temperature, review your code versus what Jeremy shows in the video and make any needed changes in your code so it matches his code. Good luck on not needing any debugging!

Hope to see you at the July 10th meeting for the Humboldt Microcontrollers Group, 6 - 8 PM at 1385 8th Street, Arcata, California. The main topic for the meeting is discussing the I2C and Processing concepts used in the above temperature sensing exercise, as well as any problems people had with the exercise, and maybe some interesting I2C, Processing, or temperature sensing tips and tricks people know of or discovered in the past two weeks.

**********
Read More..

Jumat, 06 Mei 2016

7 15 DIY「魚菜共生」系統訓練


 
 

 
Read More..

Minggu, 10 April 2016

Wireless Communication For Microcontrollers August 7 MCU Group Meeting

Traditionally, microcontrollers (MCUs) didnt need wireless communications because they did all their interactions in a limited space. If they interacted with something a few inches or a few feet away, wires connected the interacting devices. However, in 2014 some MCU applications require wireless communication, and this post takes an initial look at the wonderful world of wireless for MCUs.
Breadboard setup for #9 video wireless communication

This posts overview of MCU wireless looks at Jeremy Blums #9 Arduino video tutorial, the wireless exercise Ed Smith developed as his alternative to using the BOM components (bill of materials) and code in Jeremys #9 video exercise, and a few recent developments and web resources for MCU wireless communication. In addition to presenting an updated look at MCU wireless, researching and writing this post is a step toward locating or developing a training exercise for Arduino wireless communication that is more up to date than Jeremys #9 video, which was published in Febrary 2011.

Two of the primary driving forces behind MCU wireless communications are the internet and the increasing power of mobile or miniature computing devices. As the increasingly ubiquitous smartphone and the rise of the Internet of Things (IoT) create a sharp increase in the production volume and tech innovation in MCU wireless components, the number of wireless technology solutions continues to rise and the cost to do wireless communications continues to drop. If you search online for MCU wireless projects, tutorials or components, check the dates on your search results. Information from five or even two years ago may be totally outdated.

First up -- points of discussion about Jeremys #9 video at tonights Humboldt Microcontrollers Group meeting.

Most of the participants in tonights meeting had watched all or part of the #9 video. But no one had done the exact wireless exercise that Jeremy demonstrated and explained. The primary reason no one duplicated his exercise was that the components in Jeremys exercise cost too much to buy for learning about wireless. If you already had a couple spare Arduino Unos and the XBee components sitting around idle, then Jeremys exercise would be reasonable, but it didnt make sense to anyone at the meeting to buy all the components just to do the #9 video exercise. The main value of the #9 video seemed to be that it focused everyones attention on MCU wireless communication, and even if we didnt follow Jeremys exercise exactly, a couple people in the group did develop somewhat analogous wireless systems. And there was a lot of good discussion about the various wireless options and components, probably more than if everyone had used Jeremys components.

Nordic RF module
Second topic -- Ed Smiths MCU wireless communications components, circuitry and code.

Ed put together a low-cost wireless exercise using a couple Nordic RF transceivers he had available. The parts used in Eds setup include Texas Instruments Tiva-C launchpad 296-35760-ND, Texas Instruments MSP430G2553 Launchpad 296-27570-ND, Nordic 2.4 GHz RF transceiver NRF24L01+, Pin header 952-2247-ND, Pin socket header S7031-ND, perfboard, jumper wires, solderless breadboard, TFT LCD 2.2" 240x320 and an accelerometer. The breadboarded circuit for the MSP430 and accelerometer is shown in the picture below on the right. Eds hardware sent 3-axis information from the accelerometer from the MSP430 to the Tiva-C board and displayed it on the small LCD screen. The code was written using Energia, which is designed
MSP430 with Nordic RF 
"bring the Wiring and Arduino framework to the Texas Instruments MSP430 based LaunchPad". Ed will be writing up a separate blog post about his setup and the Nordic transceivers, including code and pictures, so look for that to show up on this blog soon.

An alternative to the wireless components Jeremy used in the #9 video and the components Ed used is the JeeNode. Nick got two JeeNodes for about $22 each with 915 MHz radios and worked with MCU wireless using those boards. According to Digital Smarties, the UK fulfillment transaction processors for the boards, the JeeNode is,
"a compact wireless board with an Atmel 8-bit RISC microprocessor. JeeNodes are compatible with the Arduino platform and can be programmed under Windows, Mac OS X, or Linux using sketches created with the Arduino IDE. Each JeeNode has 4
identical “ports” for attaching analog and digital I/O logic, I2C devices, and more. The JeeLib library makes it easy to interface to these ports. The JeeNode Kit contains all the parts needed to build a JeeNode v6 – including an ATmega328p processor and an RFM12B radio module."
Modern Device does much of the manufacturing for JeeLabs and is the US distributor for JeeNodes. The JeeLabs website describes the board this way:
"The JeeNode is a wireless micro-controller board designed for a variety of Physical Computing tasks. From measuring and reporting temperature, humidity, and other environmental data to tracking and controlling energy consumption around the house. It was inspired by the Arduino Duemilanove and Uno boards, and by the “Real Bare Bones Board” (RBBB) from Modern Device."
The JeeNode component bill of materials (BOM) for learning MCU wireless would only be slightly more expensive than the Nordic RF components. Ed said for various prototypes or applications, the JeeNode would be more capable than the Nordic systems, and would be well worth the few extra dollars.

Third subject -- Worthwhile web resources for newbies to understand MCU wireless.

I havent done an exhaustive search for web resources on MCU wireless, so please send me links to sites you feel are good on this topic, especially if you think theyre better for a particular aspect of wireless compared to the sites Ive listed. If youre new to wireless communications, you might want to read through the Wikipedia entry for Wireless Networks. If you are already have a good background on wireless networks, consider looking through the SparkFun Wireless Buying Guide. The SparkFun guide is where I read about Nordic RF modules yesterday for the first time ever. Then I found out what Ed used for his wireless exercise, and it turned out to be Nordic transceivers (or Nordic clones). The wireless section of your favorite MCU vendors website is another good place to learn about wireless, especially as it applies to the MCUs you use and understand. Atmel, Texas Instruments and Microchip main pages for wireless are listed below.
  • http://www.atmel.com/products/wireless/
  • http://www.ti.com/lsds/ti/wireless_connectivity/overview.page
  • http://www.microchip.com/pagehandler/en-us/products/wireless/home.html
If you go through the above resources and want to know more, search for your topics of interest and youll find lots of relevant websites to sift through for more specific info thats relevant to you.

Fourth issue -- Developing an inexpensive MCU wireless educational exercise for the Humboldt Microcontrollers Group.

We decided tonight that Eds setup is about as inexpensive as youre going to be able to do a two-MCU, two-transceiver wireless exercise. Another wireless learning exercise we will probably research is one with a single MCU and a Wi-Fi system to directly connect the MCU to the Internet. Figuring that one out will wait for another day.

Along with our discussions about MCU wireless, tonights Humboldt Microcontrollers Group meeting covered a multitude of topics, including but not limited to freezing hard drives to recover data from them, buying vacuum tubes, flying quadcopters that have a mind of their own, the unpredictable adventures of buying electronic components from Chinese eBay sellers, good power supplies and power supplies to stay far away from, how to load Arch Linux on a Chromebook, repairing welders, upgrades to automated doors on chicken coops, the Humboldt Laser Harp, and what the topic of the next MCU group meeting should be. If you have suggestions for MCU meeting topics, please contact me at arcatabob (at) gmail [dott] com or contact Nick A.

If you are interested or experienced in MCU wireless, it would be great to connect with you -- email me at arcatabob (at) gmail {dott} com. Hope to see you at the next Humboldt Microcontrollers Group meeting on Thursday, August 21.

**********
Read More..