Search Results

Search found 171 results on 7 pages for 'wires'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • RPi and Java Embedded GPIO: Hooking Up Your Wires for Java

    - by hinkmond
    So, you bought your blue jumper wires, your LEDs, your resistors, your breadboard, and your fill of Fry's for the day. How do you hook this cool stuff up to write Java code to blink them LEDs? I'll step you through it. First look at that pinout diagram of the GPIO header that's on your RPi. Find the pins in the corner of your RPi board and make sure to orient it the right way. The upper left corner pin should have the characters "P1" next to it on the board. That pin next to "P1" is your Pin #1 (in the diagram). Then, you can start counting left, right, next row, left, right, next row, left, right, and so on: Pins # 1, 2, next row, 3, 4, next row, 5, 6, and so on. Take one blue jumper wire and connect to Pin # 3 (GPIO0). Connect the other end to a resistor and then the other end of the resistor into the breadboard. Each row of grouped-together holes on a breadboard are connected, so plug in the short-end of a common cathode LED (long-end of a common anode LED) into a hole that is in the same grouping as where the resistor is plugged in. Then, connect the other end of the LED back to Pin # 6 (GND) on the RPi GPIO header. Now you have your first LED connected ready for you to write some Java code to turn it on and off. (As, extra credit you can connect 7 other LEDs the same way to with one lead to Pins # 5, 7, 11, 13, 15, 19 & 21). Whew! That wasn't so bad, was it? Next blog post on this thread will have some Java source code for you to try... Hinkmond

    Read the article

  • Ways to have audio output without wires

    - by viraptor
    I'm trying to find a way of using my home speakers/amp without actually having to connect them. There are two laptops that use them normally (so I don't like changing the connection all the time) and I'd rather move the speakers to a place that's away from the couch. I'm not sure how to do this though... The options I can think of are: some kind of wireless jack-jack connection finally getting a media server Unfortunately I can't find any good product for the first solution. I've seen some headphones which have the receiver integrated and a separate transmitted, so in general the idea is already out there, just not the way I need ;) I've seen also http://www.miccus.com/products/blubridge-mini-jack, but I'd have to have a compatible receiver which I can't find on its own (maybe there's some application that the media server could use?). As far as media server goes... many of the plug servers look really interesting, but I'm not sure how to create an audio output and how to redirect the input really. None of the plug servers I've seen so far advertises the option of audio output jack port. I think this part could be fixed by getting one with an usb port and a separate cheap usb soundcard. I hope that input can be sorted out in some rather simple way. I've got Linux running on both laptops so I hope that would be possible to configure jack/pulse/whatever to use the remote endpoint, or even write a simple local-/dev/dsp:network:media-server-/dev/dsp forwarder. So the main question is... are there better ways? Are there any out of the box solutions? Or maybe this was already done by someone and described somewhere?

    Read the article

  • Do 24pin motherboard wires have to be in a certain order?

    - by jasondavis
    I am wanting to sleeve all the wires in my new PC. On my 24pin motherboard connection cable, I must remove the end plastic connector piece from all the wires to sleeve them all individually. I have a couple questions about this cable though. 1) When I put all the wires back into the connector, must they be in the same order they are in now? 2) I have taken a low quality iphone photo below so you cannot see to well, but in a couple spots I marked with arrows, there is actually 2 wires going into a single slot. I am not sure what to do with those, do all 24pin motherboard connectors have some slots where 2 wires go in like that?

    Read the article

  • How to make multiple wires quickly in Verilog?

    - by user1334858
    I am trying to make 24 wires in total very quickly but I keep getting the error: Error (10170): Verilog HDL syntax error at your_ALU_mux.v(81) near text "="; expecting ".", or an identifier Here is my code: module your_ALU_mux(your_out, operandA, operandB, opcode, switches, address); input [7:0] operandA, operandB, address; input [3:0] opcode, switches; output [7:0] your_out; wire [0:7] Bnot, newb, newa; wire Cin, Cout; not (Bnot[0], operandB[0]), (Bnot[1], operandB[1]), (Bnot[2], operandB[2]), (Bnot[3], operandB[3]), (Bnot[4], operandB[4]), (Bnot[5], operandB[5]), (Bnot[6], operandB[6]), (Bnot[7], operandB[7]); // Getting A' and B' if (address == 16'h00 || address == 16'h01) // Add A + B if (address == 16'h00) // newa = A newa[0] = operandA[0]; newa[1] = operandA[1]; newa[2] = operandA[2]; newa[3] = operandA[3]; newa[4] = operandA[4]; newa[5] = operandA[5]; newa[6] = operandA[6]; newa[7] = operandA[7]; // newb = B' newb[0] = Bnot[0]; newb[1] = Bnot[1]; newb[2] = Bnot[2]; newb[3] = Bnot[3]; newb[4] = Bnot[4]; newb[5] = Bnot[5]; newb[6] = Bnot[6]; newb[7] = Bnot[7]; // Carry in = 1 Cin = 1; // A-B else if (address == 16'h01) // newb = B newb[0] = operandB[0]; newb[1] = operandB[1]; newb[2] = operandB[2]; newb[3] = operandB[3]; newb[4] = operandB[4]; newb[5] = operandB[5]; newb[6] = operandB[6]; newb[7] = operandB[7]; // newa = A newa[0] = operandA[0]; newa[1] = operandA[1]; newa[2] = operandA[2]; newa[3] = operandA[3]; newa[4] = operandA[4]; newa[5] = operandA[5]; newa[6] = operandA[6]; newa[7] = operandA[7]; // Carry in = 0 Cin = 0; end RippleCarryAdd A+B(.S0(your_out[0]), .S1(your_out[1],.S2(your_out[2],.S3(your_out[3],.S4(your_out[4],.S5(your_out[5] S6.(your_out[6]), S7.(your_out[7], .Cout(Cout),.Cin(Cin), .A0(newa[0]),.A1(newa[1]),.A2(newa[2]),.A3(newa[3]),.A4(newa[4]),.A5(newa[5]), .A6(newa[6]),.A7(newa[7]), .B0(newb[0]),.B1(newb[1]),.B2(newb[2]),.B3(newb[3]),.B4(newb[4]), .B5(newb[5]),.B6(newb[6]),.B7(newb[7])); endmodule I also get in error saying: Error (10170): Verilog HDL syntax error at your_ALU_mux.v(66) near text "if"; expecting "endmodule" And the it brings me to my first if statement. Is this the wrong way of going about creating wires and them using them?

    Read the article

  • Wires from fan on side panel - where do they connect?

    - by Mick
    The side panel of my desktop PC has a small fan built in. There were two wires, one red one black that connected inside the PC. Unfortunately I had the bolts removed and the side door fell off ripping the cables such that the main length of cable remains attached to the fan. So there must be two short stubs of broken cable somewhere - but I can't find them! Any ideas where I should look? I can't see anything on the motherboard. the PC is running perfectly well - but I now have the side open to make sure the air can circulate. EDIT: The motherboard appears to be an "Asus P6T SE" EDIT: The manual shows the location of two "chassis fan" connectors. One is being used by a big chassis fan on the back face of the PC (underneath the pwer supply). The other appears to be unused - there is no stub of a connector with wires - its just the bare pins sticking directly out of the motherboard. There is also an unused "pwr_fan" connector. Would it be ok to simply connect the black and red wires from the fan to the black and red parts of a molex adapter?

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • Is there a peripheral that lets my computer monitor the connectivity of pairs of wires?

    - by raldi
    I've got a bunch of physical switches and circuits that act like switches (they're either connected to ground or they're just an open wire). Is there some sort of thing I can plug into my computer (ideally, via USB) that has a bunch of screw terminals, and I can attach wires to the screws and have the computer keep track of which circuits are closed and which are open? Bonus points if the device also lets the computer open and close switches, too. I don't even know what to google for.

    Read the article

  • Where do I connect the HDD LED wires on my RAID adapter?

    - by Giffyguy
    I'm using a Promise FastTrak TX8660 with RAID 5. The manual (and Google) just doesn't seem to explain how exactly to connect a standard two-pin HDD LED wire to the eight available pins on the card. The Manual just says - To connect your LED, follow the following diagram: The card itself resembles the diagram: But it doesn't make any sense to me. All I have is a two-pin connecter for HDD LED on the front of my computer case. I don't need anything fancy like the fault LED or seperate indicators for each drive. I just want to be able to see when my RAID 5 array is working, that's all. I don't know what the "R" and "G" stand for, but my HDD LED wires are red and white. I tried connecting the red wire to the "R" pin and the white wire to the "G" pin, but that just makes the LED on the front of my case light up indefinitely, even when the computer is idle. Which pins am I suppose to connect the HDD LED header to for basic activity indication?

    Read the article

  • PHP arrays. There must be a simpler method to do this

    - by RisingSun
    I have this array in php returned from db Array ( [inv_templates] = Array ( [0] = Array ( [inven_subgroup_template_id] = 1 [inven_group] = Wires [inven_subgroup] = CopperWires [inven_template_id] = 1 [inven_template_name] = CopperWires6G [constrained] = 0 [value_constraints] = [accept_range] = 2 - 16 [information] = Measured Manual ) [1] = Array ( [inven_subgroup_template_id] = 1 [inven_group] = Wires [inven_subgroup] = CopperWires [inven_template_id] = 2 [inven_template_name] = CopperWires2G [constrained] = 0 [value_constraints] = [accept_range] = 1 - 7 [information] = Measured by Automated Calipers ) ) ) I need to output this kind of multidimensional stuff Array ( [Wires] = Array ( [inv_group_name] = Wires [inv_subgroups] = Array ( [CopperWires] = Array ( [inv_subgroup_id] = 1 [inv_subgroup_name] = CopperWires [inv_templates] = Array ( [CopperWires6G] = Array ( [inv_name] = CopperWires6G [inv_id] = 1 ) [CopperWires2G] = Array ( [inv_name] = CopperWires2G [inv_id] = 2 ) ) ) ) ) ) I currently do this stuff foreach ($data['inv_templates'] as $key = $value) { $processeddata[$value['inven_group']]['inv_group_name'] = $value['inven_group']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_subgroup_id'] = $value['inven_subgroup_template_id']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_subgroup_name'] = $value['inven_subgroup']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_templates'][$value['inven_template_name']]['inv_name'] = $value['inven_template_name']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_templates'][$value['inven_template_name']]['inv_id'] = $value['inven_template_id']; } return $processeddata; EDIT : A var_export array ( 'inv_templates' = array ( 0 = array ( 'inven_subgroup_template_id' = '1', 'inven_group' = 'Wires', 'inven_subgroup' = 'CopperWires', 'inven_template_id' = '1', 'inven_template_name' = 'CopperWires6G', 'constrained' = '0', 'value_constraints' = '', 'accept_range' = '2 - 16', 'information' = 'Measured Manual', ), 1 = array ( 'inven_subgroup_template_id' = '1', 'inven_group' = 'Wires', 'inven_subgroup' = 'CopperWires', 'inven_template_id' = '2', 'inven_template_name' = 'CopperWires6G', 'constrained' = '0', 'value_constraints' = '', 'accept_range' = '1 - 7', 'information' = 'Measured by Automated Calipers', ), ), ) The foreach is almost unreadable. There must be a simpler way

    Read the article

  • Electronic circuit simulator four-way flood-filling issues

    - by AJ Weeks
    I've made an electronic circuit board simulator which has simply 3 types of tiles: wires, power sources, and inverters. Wires connect to anything they touch, other than the sides of inverters; inverters have one input side and one output side; and finally power tiles connect in a similar manner as wires. In the case of an infinite loop, caused by the output of the inverter feeding into its input, I want inverters to oscillate (quickly turn on/off). I've attempted to implement a FloodFill algorithm to spread the power throughout the grid, but seem to have gotten something wrong, as only the tiles above the power source get powered (as seen below) I've attempted to debug the program, but have had no luck thus far. My code concerning the updating of power can be seen here.

    Read the article

  • Flow-Design Cheat Sheet – Part I, Notation

    - by Ralf Westphal
    You want to avoid the pitfalls of object oriented design? Then this is the right place to start. Use Flow-Oriented Analysis (FOA) and –Design (FOD or just FD for Flow-Design) to understand a problem domain and design a software solution. Flow-Orientation as described here is related to Flow-Based Programming, Event-Based Programming, Business Process Modelling, and even Event-Driven Architectures. But even though “thinking in flows” is not new, I found it helpful to deviate from those precursors for several reasons. Some aim at too big systems for the average programmer, some are concerned with only asynchronous processing, some are even not very much concerned with programming at all. What I was looking for was a design method to help in software projects of any size, be they large or tiny, involing synchronous or asynchronous processing, being local or distributed, running on the web or on the desktop or on a smartphone. That´s why I took ideas from all of the above sources and some additional and came up with Event-Based Components which later got repositioned and renamed to Flow-Design. In the meantime this has generated some discussion (in the German developer community) and several teams have started to work with Flow-Design. Also I´ve conducted quite some trainings using Flow-Orientation for design. The results are very promising. Developers find it much easier to design software using Flow-Orientation than OOAD-based object orientation. Since Flow-Orientation is moving fast and is not covered completely by a single source like a book, demand has increased for at least an overview of the current state of its notation. This page is trying to answer this demand by briefly introducing/describing every notational element as well as their translation into C# source code. Take this as a cheat sheet to put next to your whiteboard when designing software. However, please do not expect any explanation as to the reasons behind Flow-Design elements. Details on why Flow-Design at all and why in this specific way you´ll find in the literature covering the topic. Here´s a resource page on Flow-Design/Event-Based Components, if you´re able to read German. Notation Connected Functional Units The basic element of any FOD are functional units (FU): Think of FUs as some kind of software code block processing data. For the moment forget about classes, methods, “components”, assemblies or whatever. See a FU as an abstract piece of code. Software then consists of just collaborating FUs. I´m using circles/ellipses to draw FUs. But if you like, use rectangles. Whatever suites your whiteboard needs best.   The purpose of FUs is to process input and produce output. FUs are transformational. However, FUs are not called and do not call other FUs. There is no dependency between FUs. Data just flows into a FU (input) and out of it (output). From where and where to is of no concern to a FU.   This way FUs can be concatenated in arbitrary ways:   Each FU can accept input from many sources and produce output for many sinks:   Flows Connected FUs form a flow with a start and an end. Data is entering a flow at a source, and it´s leaving it through a sink. Think of sources and sinks as special FUs which conntect wires to the environment of a network of FUs.   Wiring Details Data is flowing into/out of FUs through wires. This is to allude to electrical engineering which since long has been working with composable parts. Wires are attached to FUs usings pins. They are the entry/exit points for the data flowing along the wires. Input-/output pins currently need not be drawn explicitly. This is to keep designing on a whiteboard simple and quick.   Data flowing is of some type, so wires have a type attached to them. And pins have names. If there is only one input pin and output pin on a FU, though, you don´t need to mention them. The default is Process for a single input pin, and Result for a single output pin. But you´re free to give even single pins different names.   There is a shortcut in use to address a certain pin on a destination FU:   The type of the wire is put in parantheses for two reasons. 1. This way a “no-type” wire can be easily denoted, 2. this is a natural way to describe tuples of data.   To describe how much data is flowing, a star can be put next to the wire type:   Nesting – Boards and Parts If more than 5 to 10 FUs need to be put in a flow a FD starts to become hard to understand. To keep diagrams clutter free they can be nested. You can turn any FU into a flow: This leads to Flow-Designs with different levels of abstraction. A in the above illustration is a high level functional unit, A.1 and A.2 are lower level functional units. One of the purposes of Flow-Design is to be able to describe systems on different levels of abstraction and thus make it easier to understand them. Humans use abstraction/decomposition to get a grip on complexity. Flow-Design strives to support this and make levels of abstraction first class citizens for programming. You can read the above illustration like this: Functional units A.1 and A.2 detail what A is supposed to do. The whole of A´s responsibility is decomposed into smaller responsibilities A.1 and A.2. FU A thus does not do anything itself anymore! All A is responsible for is actually accomplished by the collaboration between A.1 and A.2. Since A now is not doing anything anymore except containing A.1 and A.2 functional units are devided into two categories: boards and parts. Boards are just containing other functional units; their sole responsibility is to wire them up. A is a board. Boards thus depend on the functional units nested within them. This dependency is not of a functional nature, though. Boards are not dependent on services provided by nested functional units. They are just concerned with their interface to be able to plug them together. Parts are the workhorses of flows. They contain the real domain logic. They actually transform input into output. However, they do not depend on other functional units. Please note the usage of source and sink in boards. They correspond to input-pins and output-pins of the board.   Implicit Dependencies Nesting functional units leads to a dependency tree. Boards depend on nested functional units, they are the inner nodes of the tree. Parts are independent, they are the leafs: Even though dependencies are the bane of software development, Flow-Design does not usually draw these dependencies. They are implicitly created by visually nesting functional units. And they are harmless. Boards are so simple in their functionality, they are little affected by changes in functional units they are depending on. But functional units are implicitly dependent on more than nested functional units. They are also dependent on the data types of the wires attached to them: This is also natural and thus does not need to be made explicit. And it pertains mainly to parts being dependent. Since boards don´t do anything with regard to a problem domain, they don´t care much about data types. Their infrastructural purpose just needs types of input/output-pins to match.   Explicit Dependencies You could say, Flow-Orientation is about tackling complexity at its root cause: that´s dependencies. “Natural” dependencies are depicted naturally, i.e. implicitly. And whereever possible dependencies are not even created. Functional units don´t know their collaborators within a flow. This is core to Flow-Orientation. That makes for high composability of functional units. A part is as independent of other functional units as a motor is from the rest of the car. And a board is as dependend on nested functional units as a motor is on a spark plug or a crank shaft. With Flow-Design software development moves closer to how hardware is constructed. Implicit dependencies are not enough, though. Sometimes explicit dependencies make designs easier – as counterintuitive this might sound. So FD notation needs a ways to denote explicit dependencies: Data flows along wires. But data does not flow along dependency relations. Instead dependency relations represent service calls. Functional unit C is depending on/calling services on functional unit S. If you want to be more specific, name the services next to the dependency relation: Although you should try to stay clear of explicit dependencies, they are fundamentally ok. See them as a way to add another dimension to a flow. Usually the functionality of the independent FU (“Customer repository” above) is orthogonal to the domain of the flow it is referenced by. If you like emphasize this by using different shapes for dependent and independent FUs like above. Such dependencies can be used to link in resources like databases or shared in-memory state. FUs can not only produce output but also can have side effects. A common pattern for using such explizit dependencies is to hook a GUI into a flow as the source and/or the sink of data: Which can be shortened to: Treat FUs others depend on as boards (with a special non-FD API the dependent part is connected to), but do not embed them in a flow in the diagram they are depended upon.   Attributes of Functional Units Creation and usage of functional units can be modified with attributes. So far the following have shown to be helpful: Singleton: FUs are by default multitons. FUs in the same of different flows with the same name refer to the same functionality, but to different instances. Think of functional units as objects that get instanciated anew whereever they appear in a design. Sometimes though it´s helpful to reuse the same instance of a functional unit; this is always due to valuable state it holds. Signify this by annotating the FU with a “(S)”. Multiton: FUs on which others depend are singletons by default. This is, because they usually are introduced where shared state comes into play. If you want to change them to be a singletons mark them with a “(M)”. Configurable: Some parts need to be configured before the can do they work in a flow. Annotate them with a “(C)” to have them initialized before any data items to be processed by them arrive. Do not assume any order in which FUs are configured. How such configuration is happening is an implementation detail. Entry point: In each design there needs to be a single part where “it all starts”. That´s the entry point for all processing. It´s like Program.Main() in C# programs. Mark the entry point part with an “(E)”. Quite often this will be the GUI part. How the entry point is started is an implementation detail. Just consider it the first FU to start do its job.   Patterns / Standard Parts If more than a single wire is attached to an output-pin that´s called a split (or fork). The same data is flowing on all of the wires. Remember: Flow-Designs are synchronous by default. So a split does not mean data is processed in parallel afterwards. Processing still happens synchronously and thus one branch after another. Do not assume any specific order of the processing on the different branches after the split.   It is common to do a split and let only parts of the original data flow on through the branches. This effectively means a map is needed after a split. This map can be implicit or explicit.   Although FUs can have multiple input-pins it is preferrable in most cases to combine input data from different branches using an explicit join: The default output of a join is a tuple of its input values. The default behavior of a join is to output a value whenever a new input is received. However, to produce its first output a join needs an input for all its input-pins. Other join behaviors can be: reset all inputs after an output only produce output if data arrives on certain input-pins

    Read the article

  • RPi and Java Embedded GPIO: It all begins with hardware

    - by hinkmond
    So, you want to connect low-level peripherals (like blinky-blinky LEDs) to your Raspberry Pi and use Java Embedded technology to program it, do you? You sick foolish masochist. No, just kidding! That's awesome! You've come to the right place. I'll step you though it. And, as with many embedded projects, it all begins with hardware. So, the first thing to do is to get acquainted with the GPIO header on your RPi board. A "header" just means a thingy with a bunch of pins sticking up from it where you can connect wires. See the the red box outline in the photo. Now, there are many ways to connect to that header outlined by the red box in the photo (which the RPi folks call the P1 header). One way is to use a breakout kit like the one at Adafruit. But, we'll just use jumper wires in this example. So, to connect jumper wires to the header you need a map of where to connect which wire. That's why you need to study the pinout in the photo. That's your map for connecting wires. But, as with many things in life, it's not all that simple. RPi folks have made things a little tricky. There are two revisions of the P1 header pinout. One for older boards (RPi boards made before Sep 2012), which is called Revision 1. And, one for those fancy 512MB boards that were shipped after Sep 2012, which is called Revision 2. So, first make sure which board you have: either you have the Model A or B with 128MB or 256MB built before Sep 2012 and you need to look at the pinout for Rev. 1, or you have the Model B with 512MB and need to look at Rev. 2. That's all you need for now. More to come... Hinkmond

    Read the article

  • 1k of Program Space, 64 bytes of RAM. Is assembly an absolute must?

    - by Earlz
    (If your lazy see bottom for TL;DR) Hello, I am planning to build a new (prototype) project dealing with physical computing. Basically, I have wires. These wires all need to have their voltage read at the same time. More than a few hundred microseconds difference between the readings of each wire will completely screw it up. The Arduino takes about 114 microseconds. So the most I could read is 2 or 3 wires before the latency would skew the accuracy of the readings. So my plan is to have an Arduino as the "master" of an array of ATTinys. The arduino is pretty cramped for space, but it's a massive playground compared to the tinys. An ATTiny13A has 1k of flash ROM(program space), 64 bytes of RAM, and 64 bytes of (not-durable and slow) EEPROM. (I'm choosing this for price as well as size) The ATTinys in my system will not do much. Basically, all they will do is wait for a signal from the Master, and then read the voltage of 1 or 2 wires and store it in RAM(or possibly EEPROM if it's that cramped). And then send it to the Master using only 1 wire for data.(no room for more than that!). So far then, all I should have to do is implement trivial voltage reading code (using built in ADC). But this communication bit I'm worried about. Do you think a communication protocol(using just 1 wire!) could even be implemented in such constraints? TL;DR: In less than 1k of program space and 64 bytes of RAM(and 64 bytes of EEPROM) do you think it is possible to implement a 1 wire communication protocol? Would I need to drop to assembly to make it fit? I know that currently my Arduino programs linking to the Wiring library are over 8k, so I'm a bit concerned.

    Read the article

  • 1k of Program Space, 64 bytes of RAM. Is 1 wire communication possible?

    - by Earlz
    (If your lazy see bottom for TL;DR) Hello, I am planning to build a new (prototype) project dealing with physical computing. Basically, I have wires. These wires all need to have their voltage read at the same time. More than a few hundred microseconds difference between the readings of each wire will completely screw it up. The Arduino takes about 114 microseconds. So the most I could read is 2 or 3 wires before the latency would skew the accuracy of the readings. So my plan is to have an Arduino as the "master" of an array of ATTinys. The arduino is pretty cramped for space, but it's a massive playground compared to the tinys. An ATTiny13A has 1k of flash ROM(program space), 64 bytes of RAM, and 64 bytes of (not-durable and slow) EEPROM. (I'm choosing this for price as well as size) The ATTinys in my system will not do much. Basically, all they will do is wait for a signal from the Master, and then read the voltage of 1 or 2 wires and store it in RAM(or possibly EEPROM if it's that cramped). And then send it to the Master using only 1 wire for data.(no room for more than that!). So far then, all I should have to do is implement trivial voltage reading code (using built in ADC). But this communication bit I'm worried about. Do you think a communication protocol(using just 1 wire!) could even be implemented in such constraints? TL;DR: In less than 1k of program space and 64 bytes of RAM(and 64 bytes of EEPROM) do you think it is possible to implement a 1 wire communication protocol? Would I need to drop to assembly to make it fit? I know that currently my Arduino programs linking to the Wiring library are over 8k, so I'm a bit concerned.

    Read the article

  • JavaScript function, which reads connections between objects

    - by Nikita Sumeiko
    I have a JavaScript literal: var members = { "mother": { "name" : "Mary", "age" : "48", "connection": { "brother" : "sun" } }, "father": { "name" : "Bill", "age" : "50" }, "brother": { "name" : "Alex", "age" : "28" } } Than I have a function, which should read connections from the literal above. It looks like this: function findRelations(members){ var wires = new Array(); var count = 0; for (n = 0; n < members.length; n++){ alert(members.length); // this alert is undefined if (members[n].connection){ for (i = 0; i < members[n].connection[0].length; i++){ var mw = new Array(); var destination = 0; for (m = 0; m < members.length; m ++){ if (members[m] == members[n].connection[0]){ destination = m; mw = [n, destination]; wires [count] = mw; count++; } } } } } return wires; } However, when I run this function, I get nothing. And the first alert, which is placed inside the function shows 'undefined' at all. findRelations(members); alert("Found " + wires.length + " connections"); I guess that's because of JavaScript literal. Could you suggest how to change a function or perhaps to change litteral to JSON array to get it work?! And at the end to get 'm' and 'n' values as numbers.

    Read the article

  • Does an XPathDocument load the whole xml document?

    - by Wires
    If I do XPathDocument doc = new XPathDocument("filename.xml"); Does that load the entire document into memory? I'm writing a mobile phone app and the document might store lots of data that doesn't ever need to all be loaded at the same time. Mobile phones don't usually have too much ram!

    Read the article

  • How can I change the tick marks scale in MATLAB?

    - by Wires
    Hey, I have a matrix A which I am plotting using imagesc(A). The matrix is a 512 X 512 matrix, but I need the axes to be labeled from 0 to 4000 instead of 0 to 512. I can't seem to find where I can change this instead of just changing from where to where the points are plotted!

    Read the article

  • Misadventures at Radio Shack

    - by Chris Williams
    While I'm waiting for my Arduino kits to show up, I started reading the Getting Started With Arduino book from O'Reilly (review coming later) and I'm about 40 pages in when I get to a parts list for one of the first projects. Looks pretty straightforward, and even has Radio Shack part numbers next to almost everything. So on my lunch today, I decided to run out to "The Shack" (seriously, that's their rebranding?) to pick up some basics, like a couple resistors, a breadboard, a momentary switch and a pack of pre-cut jumper wires. I found the resistors without any difficulty, and while they didn't have the exact switch I wanted, it was easy enough to find one that would do. That's where my good luck abruptly ended. I was surprised that I couldn't find a breadboard or any jumper wires, so while I was looking around, a guy came up and asked me if I needed some help. I told him I did, explained what I needed and even gave him the Radio Shack part number for the pack of jumper wires. After a couple minutes he says he can't find anything in the system, which was unfortunate but not the end of the world.  So then I asked him about the breadboard, and he pointed me to some blank circuitboards (which are not the same thing) and I said (nicely) that those weren't breadboards and attempted to explain (again) what I needed, at which point he says to me "I don't even know what the hell you're looking for!" I stood there for a moment and tried to process his words. About that time, another salesperson came up and asked what I was trying to find. I told her I needed a breadboard, and she pointed to the blank circuit boards and said "they're right in front of you..." After seeing the look on my face, she thought for a minute and said... "OH! you mean those white things. We don't have those anymore." I thanked her, set everything down on the counter and left. (I wasn't going to buy only half the stuff I needed.. and I was pretty sure I was never going to be buying ANYTHING at that particular location ever again.) Guess I'll be ordering more stuff online at this point. It's a shame really, because I used to LOVE going to Radio Shack as a kid, and looking through all the cool electronics components and stuff, even if I didnt understand what most of them were at the time. Seems like the only thing they carry in any quantity/variety now is cell phones and random stereo connectors.

    Read the article

  • RPi and Java Embedded GPIO: Connecting LEDs

    - by hinkmond
    Next, we need some low-level peripherals to connect to the Raspberry Pi GPIO header. So, we'll do what's called a "Fry's Run" in Silicon Valley, which means we go shop at the local Fry's Electronics store for parts. In this case, we'll need some breadboard jumper wires (blue wires in photo), some LEDs, and some resistors (for the RPi GPIO, 150 ohms - 300 ohms would work for the 3.3V output of the GPIO ports). And, if you want to do other projects, you might as well by a breadboard, which is a development board with lots of holes in it. Ask a Fry's clerk for help. Or, better yet, ask the customer standing next to you in the electronics components aisle for help. (Might be faster) So, go to your local hobby electronics store, or go to Fry's if you have one close by, and come back here to the next blog post to see how to hook these parts up. Hinkmond

    Read the article

  • How would I go about updating my electronic circuit simulator's 'electricity'?

    - by liqwidice
    I have made an application which allows the user to place down wires, power sources, and inverters on a virtual circuit board. All connections between tiles are automatic, as shown here: As you can see in the last image, the updating of power throughout this grid is not yet functioning. I think I understand how to do this updating conceptually, but getting it to work in my program is appearing to be much more difficult than I first imagined. My source code can be found here. If you have any tips as to how to I might approach this monstrous task, please let me know. EDIT The goal here is to simply get a working application. Getting tiles to pass on power to their neighbors is quite easy, but the tricky part is getting wires to "unpower" after the removal of a power source. The size of the grid is just 18x18, so efficiency really isn't a factor, for those wondering.

    Read the article

  • Broad Band LAN connection through existing 6 wire phone line ( no phone connected )

    - by Paul Taylor
    I have an (up to but never achieved ) 10 mb broadband signal coming into my house along the telephone line. The modem then connects the broadband signal via a LAN connection and Wi-Fi signal to my computers and iPad. My workshop desk is 54 yards (approx. 50m) downhill from the modem (part of a separate building) – too far to give a good direct signal. The inside corner of the workshop (by a window) receives a weak signal. I have a disconnected telephone cable consisting of 6 wires going from the house to the workshop. The telephone is no longer used in the workshop - we use our mobile number for business calls. A broad band signal using the cable would not have to share with a phone. What would be the most economic price/efficient way to get the broadband signal to the workshop? I am writing in hope that since the telephone didn't need the six wires, an Ethernet connection might be similar and not need all the eight wires for a LAN connection. In theory could use the telephone wire to pull an Ethernet cable trough the underground pipe but I doubt if the cable would survive the strain. The broad band connection in the workshop does not have to have network facility. My skill level is high enough to do house wiring, plumbing and gas fitting; so given any sound advice and a wiring diagram or instructions I can probably work out the rest myself.

    Read the article

  • Why my computer working without harddisc with livecd, but with hardisk not working - computer not response to any signals?

    - by Yosef
    Hi, History of problem: I formated computer (HP Pavalion Desktop). When I restart computer - computer come to first screen before boot and not response to any signals (f2, f10, ESC, etc..) I take out motherboad battery return after time back and power computer - result : as before I disconnect wires of hard-disk and insert livecd UBUNTU to cd and power coputer: result: works without hard-disk. What is the root of problem: hard-disk broken? hard-disk wires not working well? BIOS? other reason How can I fix the problem?(Buy new hard disk etc...) Thanks, Yosef

    Read the article

1 2 3 4 5 6 7  | Next Page >