Home
SquareWear 2.0 User Manual
Contents
1. cable and charge the battery for 15 minutes before using it again Keep battery plugged in at all times Certain functionality such as buzzer and USB bootloader may not work reliably if the battery is removed e Pin Names and Functions SquareWear uses the same pin names as Arduino O Digital 1 O pins the board has 8 available digital I O pins DO D1 also serial RX TX pin D3 D5 D6 MOSFET pins support PWM D10 D11 support PWM D13 internally wired to blue LED PWM Pulse Width Modulation also referred to as analog output provides adjustable level of voltage You can use PWM to control the brightness of the LED the speed of a motor etc All PWM pins can function as standard digital I O pins but additionally you can use Arduino s analogWrite function to set analog voltage levels D13 is internally connected to the blue LED Setting this pin HIGH will light up the blue LED MOSFET Pins D3 D5 D6 support PWM and in addition they are internally wired through MOSFETs The MOSFETs function as Power Sinks This means setting the pins to logical high will connect them to GND and setting them low will disconnect them from GND Therefore in order to use MOSFET pins such as for controlling an LED you need to connect the positive lead of the LED to VCC and negative lead to one of these Power Sink pins By setting the pin high or low you can control the LED The main advantage of Power Sink pi
2. in etc udev rules d to give permission to the USB device Alternatively run Arduino in sudo mode o Next to upload a program click on the Upload button in Arduino Once the program is uploaded the microcontroller will start running the program immediately If the Arduino output reports the following error avrdude error could not find USB device USBasp with vid 0x16c0 pid 0x5dc That means either you did not successfully enter program mode or if you are in Linux you don t have system permission to use the USB device If the output reports the following warning it s normal Just ignore them avrdude warning cannot set sck period please check for usbasp firmware update avrdude error usbasp_ transmit error sending control message Broken pipe o To upload a new program repeat the above steps e Using Existing Arduino Programs O Because SquareWear 2 0 is based on Arduino you can upload any existing Arduino program The Arduino software has numerous example programs Just make sure that you suitably modify the program to match the pins assignment on SquareWear 2 0 e Temperature Sensor O O According to the datasheet of MCP9700 if the temperature sensor reading analog value is A the temperature in Celsius is C A 3 25 1024 0 5 0 01 The conversion from Celsius to Fahrenheit is F C 32 5 9 Some SquareWears used MCP9701 and the equation is C A 3 25 1024 0 4 0 0195 S
3. SquareWear 2 0 User Manual SquareWear 2 0 comes with a pre flashed demo program Clicking on the push button will cycle through all available demos in the program Additional demos are available in the SquareWear 2 0 Arduino library Instructions can be found at the beginning of each program s source code Hardware Interface Original Version brown battery holder Ja g i e 9 i ATS D3 D5 D MOSFET pins agm PUSH button il t z ae WE z te vi B GN RRI ot wh Analog and I2C Pins f A2 A5 LULLE a Charging Indicator Biai e 2 ii HA ase Temperature Sensor DO RX ag eee gt AE D1 TX C NE Buzzer Light Sensor E a tS S se Color LED bs LIR2032 Lithium WCC 3 3V Rechargeable Coin Revised Version white battery holder V2 0 a ra switch J nf S D3 MOSFET Temperature pis D e BE CE AS SCL A wm a a DO RX ier oe D1 TX 19 oo N SEER EE Ant wm al Buzzer Light Sensor Color LED N aN E Charging Indicator N A LIR2032 Lithium VCC 3 3V Rechargeable Coin e Technical Spec 0O O0 O 0 0 ATmega328 running at 3 3V 12MHz pre flashed with USBasp bootloader MCP1700 3 3V 250mA LDO linear regulator MCP73831 lithium charging chip configured to charge at 35mA MCP9700 temperature sensor 10K photo resistor light sensor 5mm color RGB LED 8 5mm SMT buzzer 6mm SMT ta
4. ctile button LIR2032 20mm rechargeable lithium coin battery 45mAh capacity 2 0mm JST connector for external lithium battery Four BSS138 MOSFETs SMT mini USB port and power switch e Power Options IMPORTANT Please READ O SquareWear 2 0 has a built in 45mAh rechargeable lithium coin battery LIR2032 Every time you plug in the mini USB cable it charges the battery automatically Do NOT use it with non rechargeable batteries such as CR2032 You can also power SquareWear by an external Lithium Polymer LiPo battery such as rayshobby net cart accessories acc batteries lipo 700 When using external LiPo please remove the built in coin battery To remove the built in LIR2032 carefully push back the metal tap on the battery holder until you can lift the battery up DO NOT force lifting the battery as it may break the battery holder If it ever breaks use some hot glue to fix it back in place The build in lithium charger MCP73831 is set to charge at 40mA per hour the charging current can be modified by changing a resistor This will fully charge the coin battery in 1 hour The charging time for external LiPo varies depending on the battery Capacity The green indicator LED will turn off when battery is fully charged SquareWear has a built in LDO MCP1700 to provide regulated 3 3V from battery When battery voltage drops below 2 7V the microcontroller will stop running In this case you should plug in a USB
5. mulate a mouse a keyboard or other HID devices Examples can be found in the V USB website e Using Adafruit s Neopixel Library o The SquareWear software pack has pre installed Adafruit s Neopixel library You can use it to interface with WS2811 2812 2813 LED strips matrices The SquareWear examples include a few demos ledpad xxx These demo programs assume the LED strip matrix is connected as follows VCC red wire GND black wire and pin D1 white wire
6. ncoming string Important because the library is not interrupt driven you must call serial poll as frequently as possible to handle USB requests in time This can be done by inserting serial poll inthe inner loop and ensure that it s called frequently o Host software to use the HID serial function you need to run host software called HID Serial Monitor It s cross platform To use the software First click on the Connect button to connect the device if unsuccessful check if SquareWear is turned on and if you have followed the above descriptions for calling serial begin and serial poll in your sketch Once connected whenever a string is H1IDSerialMonitor _ Disconnect HID Serial Monitor transferred from the device to host it will be displayed in the text area To send a string from the host to the device Output Connect to device first type the string in the text field and then click ge aerate Light 103 on Send tight 104 o Light 92 e Limitation due to software limitation ight a Light 104 Light 92 do not send a string longer than 32 T Light 104 characters at a time Sending a string l longer than 32 characters may results in buffer overflow or an error You can also pause the device and host communication by clicking on the Pause button e Simulate Human Interface Devices HID o Because SquareWear uses the V USB implementation you can program it to si
7. ns is that they can drive a high amount of current so your LEDs will look very bright your speaker will sound loud etc You can also use the MOSFET pins to drive a motor a heat wire a muscle wire etc Each MOSFET can drive up to 250mA current You can combine the three MOSFET pins together to drive more current O Analog Input pins SquareWear 2 0 has 4 available analog input pins A2 also digital D16 A3 also digital D17 A4 also digital D18 and I2C SDA pin AS also digital D19 and I2C SCL pin Analog pins are typically used to read analog signals such as sensor values They can also function as digital I O pins O Internally Assigns Pins not available for general purpose applications D2 D7 USB D D D4 push button also used to enter bootloader D8 D12 D13 red green blue channel of the RGB LED D9 buzzer AO A1 light temperature sensor o Sewing SquareWear has large pin holes allowing you to stitch conductive threads through them and attach the board to textile or fabric You can also solder wires directly to the pin pads or solder sew on snaps to allow quick attachment to detachment from textile e Programming SquareWear 2 0 e Pre Requisites o The recommended way to set up software is by downloading one of the following pre configured Arduino installation files Mac http rayshobby net software arduino 1 0 5 squarewear macos zip Win http rayshobby net software arduino 1 0 5
8. o if the first equation does not work try the second equation e Using the SoftPWM library O O The color LED is not wired to hardware PWM pins so you cannot use analogWrite directly on the color LED But the SquareWear library includes a Soft PWM software PWM library that can simulate PWM on these LEDs To use the library you need to include both HIDSerial h and Soft PWM h in your Sketch In the setup function call Sof tPWMBegin then use Soft PWMSet pin value to set a PWM value 0 to 255 to a pin any digital pin Check the fade demo for an example use of software PWM e Using the HIDSerial library O O O OU O SquareWear does not have built in USB serial converter Instead it simulates USB functions in software using the V USB library The serial communication is implemented through the HID human interface device protocol which requires no driver installation Check the hidserial demo for example The library is designed to be compatible with Arduino s Serial class as much as possible To use the library you need to include HIDSerial h in your sketch Specify a global HIDSerial class variable For example HIDSerial serial In the setup function call serial begin Use serial write char to write a single character Use serial print or println to write a string Use serial available to check if there is an incoming string from host computer Then use serial read to read the i
9. squarewear windows zip Linux32 http rayshobby net software arduino 1 0 5 squarewear linux32 zip Linux64 http rayshobby net software arduino 1 0 5 squarewear linux64 zip o These installation files are based on Arduino 1 0 5 and have pre installed necessary files to get you started They also contain drivers for Windows and SqureWear demos o Mac OS users if the pre configured software package gives you an error Arduino app is damaged and can t be opened this is because the latest OS X requires signed apps The temporary work around is to turn off this requirement in system settings The solution is described in this page o After installation run Arduino 1 0 5 from the installed folder Then in the menu select Tools gt Boards gt SquareWear 2 0 o There are many provided example programs which you can find in File gt Examples gt SquareWear2 gt e Enter Bootloader and Upload a Program IMPORTANT PLEASE READ o To upload a program plug in a mini USB cable to the USB port First turn off SquareWear i e the power switch away from USB Then press the pushbutton while turning on the power switch At this point the normal application will stop running and the controller will present itself as a USBasp programmer to the host computer In Windows you need to install USBasp driver if you haven t done so previously The driver is included in the Arduinol 0 5 drivers usbasp folder In Linux you need to create a file
Download Pdf Manuals
Related Search
Related Contents
仕様書 - RK- 24M 24MZ RK Marc-André Houde Quittez la vie ordinaire domitop h - SGC Servicios 910.100.308 REV00 MANUALE QUEEN 150 セーフティオートMD 100W/150W/200W 回答 9 募集要項 13 第13 3 提案書の作成要領 CD-Rへの格納 Rheem Classic Series: Package A/C (2-5 Ton) Tax Credit Form Raumregelgerät DC 5851 für den Pelletskaminofen USER MANUAL ELECTRIC WARM AIR FURNACE Copyright © All rights reserved.
Failed to retrieve file