Yes a timer won't work for that. The timer only updates X times per second, based on the refresh rate in the bottom right corner of the editor. So even at the fastest refresh rate you'll get a minimum pulse of about 8 milliseconds, and the pulse could only be in increments of about 8 ms.
You can use delay in a custom Arduino node. Paste the below xml into a node screen, it takes an analog input and transforms that into a pulse between 1 and 200 milliseconds on pin 3.
Note that this isn't great for Embrio, as when the pulse is running, none of the other nodes in the program will execute until the pulse is done. Depending on what else you have going on in your project this may or may not be ok.
Basically Embrio fakes parallelism by spreading each node's code out on a time line. For each node, the maximum amount of time it will take to execute is reserved. When the node executes, it's actual execution time is calculated, and any unused time is delayed. This way the nodes in the program all execute x times per second with very high accuracy.
The problem here is that the timing program will find that your node takes a long time to run, and will reserve that time. So even when the pulse isn't running high, it will still delay for about 200 milliseconds. You could of course have your node run only 2 or 4 times per second if this is ok. But note you won't really be able to have other agents running faster.
Currently there isn't an easy way to override the measured timing of a node in the application itself, but there are 2 ways you can get around this.
First, in the folder where Embrio has files (something like /Users/YourUserName/AppData/Roaming/Embrio) is a file called timingdata.txt. After you run a timing program for your node, you can open that file, find it's timing data, and change the MeasuredMicroseconds from the high number to something very low, or maybe 1000 for 1 millisecond.
Or in that same folder, in the ArduinoCompile folder you can open the ArduinoCompile.ino file. Down in the loop function you will see something like "ProcessTimedFunction(Group_2_1, 124197);". Change that high number again to 1000.
Now when the node executes, it will take as long as it takes to execute depending on how long the pulse is, then continue with the rest of the program without waiting for the unused time. So say your agent runs at 32 x per second, with a low pulse rate everything will run fine. When the pulse rate gets longer, like 200 milliseconds, then your potentiometer reading will only happen a few times per second instead of 32.
What your are trying to do kind of hits a limitation in Embrio. It will probably work, but depending on what else is happening in your program, it might not work very well. Other than a knob setting a pulse width, what else is happening in your project?
Sorry for the long post, I hope it makes sense.
<EmbrioCopy>
<Version>1.3.6.0</Version>
<Nodes>
<Node>
<UniqueID>b528ac1d-5d7a-4c48-b724-50455710d264</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName></UserDefinedName>
<Description>A node that lets you write any Arduino code to interact with the Arduino hardware. Can be both an input and output.</Description>
<NodeColor>144,183,227,255</NodeColor>
<X>316.242857142857</X>
<Y>28.6805194805197</Y>
<Width>747</Width>
<IncludeCode>int pinNumber = 3;</IncludeCode>
<DeclerationCode></DeclerationCode>
<SetupCode></SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<IsOpen>True</IsOpen>
<EditWidth>360</EditWidth>
<CodeDefinitions>
<CodeDefinition>
<UpdateCondition>InputChange</UpdateCondition>
<Code>digitalWrite(pinNumber, HIGH);
// Use a built in Embrio function. Pass it a number of microseconds to delay.
// It first uses delay() to delay the milliseconds, then delayMicros for the remaining microseconds.
// Transform the input activation from 1 to 200 milliseconds
EmbrioWait(transform(Input_Activation, 0.0, 1.0, 1000, 200000));
digitalWrite(pinNumber, LOW);</Code>
<UniqueID>69c45ca7-a63d-479c-bb2e-8487a1afd8e0</UniqueID>
<Inputs>
<Input>54335ea2-d9be-47bf-845f-e9e1cc8e6875</Input>
</Inputs>
</CodeDefinition>
</CodeDefinitions>
<Inputs>
<Input>
<UniqueID>54335ea2-d9be-47bf-845f-e9e1cc8e6875</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeInput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<ConnectedOutputs>
<Output>c313d3e3-25a6-4952-96fa-d71fe0d3a735</Output>
</ConnectedOutputs>
<BlendMode>Add</BlendMode>
<DisconnectedValue>0</DisconnectedValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Input>
</Inputs>
<Outputs></Outputs>
</Node>
<Node>
<UniqueID>fe79ca01-d815-4948-990f-c2ffa00f10ee</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerInputNode</AssemblyType>
<NodeType>Controller Input</NodeType>
<UserDefinedName></UserDefinedName>
<Description>Reads an input from an analog or digital Arduino pin.</Description>
<NodeColor>144,183,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>260</Width>
<PinType>Analog</PinType>
<RangeMin>0</RangeMin>
<RangeMax>1023</RangeMax>
<Pin>A2</Pin>
<UsePullup>False</UsePullup>
<Inputs>
<Input>
<UniqueID>d2ddae12-5d26-45de-ba27-3986d1bec116</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Design Time Activation</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>True</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeInput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>False</IsUserAdded>
<ConnectedOutputs></ConnectedOutputs>
<BlendMode>Add</BlendMode>
<DisconnectedValue>0</DisconnectedValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Input>
</Inputs>
<Outputs>
<Output>
<UniqueID>c313d3e3-25a6-4952-96fa-d71fe0d3a735</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>True</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>False</IsUserAdded>
<MinValue>0</MinValue>
<MaxValue>1</MaxValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Output>
</Outputs>
</Node>
</Nodes>
</EmbrioCopy>